Move ext/* to scripts/

This commit is contained in:
Henrik Lissner 2017-01-16 23:13:12 -05:00
parent e8438e11e5
commit 83c852e11f
7 changed files with 0 additions and 0 deletions

0
scripts/README.md Normal file
View file

23
scripts/VARS Normal file
View file

@ -0,0 +1,23 @@
#!/usr/bin/env bash
HOSTNAME=`emacs --batch --eval '(message "%s" (system-name))' 2>&1`
ROOT_DIR="$(cd $(dirname $0)/../ && pwd -P)"
CACHE_DIR="$ROOT_DIR/private/cache/$HOSTNAME"
ELPA_DIR="$ROOT_DIR/.cask/`emacs --version | grep -E -o '2[4-9]\.[0-9\.]+'`/elpa"
EXT_DIR="$ROOT_DIR/ext"
#
is-mac() { [[ "$OSTYPE" == darwin* ]]; }
is-arch() { [ -f "/etc/arch-release" ]; }
is-deb() { [ -f "/etc/debian_version" ]; }
git-repo() {
old=$(pwd)
if [ -d "$2" ]; then
cd "$2" && git pull
else
git clone --depth 1 --recursive "$1" "$2"
fi
cd "$old"
}

48
scripts/setup-cc.sh Executable file
View file

@ -0,0 +1,48 @@
#!/usr/bin/env bash
source VARS
#
echo "Setting up C/C++ (irony-mode)"
case "$OSTYPE" in
darwin*)
brew install cmake
brew install llvm --with-clang
;;
linux*)
if is-arch; then
sudo pacman --noconfirm -S cmake clang
elif is-deb; then
echo "Not implemented"
exit 1
fi
;;
esac
# Build irony-server
git-repo "https://github.com/Sarcasm/irony-mode" "irony-mode"
# Reset build directory
cd irony-mode/server
[ -d build ] && rm -rf build
mkdir build && cd build
DEST="$(pwd)/irony-mode/server/build/irony/"
# Compile
if is-mac
then
cmake -DCMAKE_INSTALL_RPATH_USE_LINK_PATH\=ON \
-DCMAKE_INSTALL_PREFIX\="$DEST" ../
else
cmake -DCMAKE_INSTALL_PREFIX\="$DEST" ../
fi
cmake --build . --use-stderr --config Release --target install
if is-mac
then
install_name_tool -change @rpath/libclang.dylib \
/usr/local/opt/llvm/lib/libclang.dylib \
$DEST/bin/irony-server
fi

11
scripts/setup-csharp.sh Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
source VARS
#
echo "Setting up C# (omnisharp)"
git-repo "https://github.com/OmniSharp/omnisharp-server" omnisharp
cd omnisharp && xbuild
mv omnisharp/bin/Debug/OmniSharp.exe ./OmniSharp.exe
rm -rf omnisharp

22
scripts/setup-js.sh Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env bash
source VARS
#
echo "Setting up JS (tern/trepanjs)"
case "$OSTYPE" in
darwin*)
brew install node
;;
linux*)
if is-arch; then
sudo pacman --needed --noconfirm -S nodejs npm
else
echo "..."
exit 1
fi
;;
esac
npm -g install trepanjs tern

25
scripts/setup-rust.sh Executable file
View file

@ -0,0 +1,25 @@
#!/usr/bin/env bash
source VARS
#
echo "Setting up Rust"
case "$OSTYPE" in
darwin*)
brew install rust
;;
linux*)
if is-arch; then
sudo pacman --noconfirm -S rust cargo
elif is-deb; then
echo ...
exit 1
fi
esac
git-repo "https://github.com/rust-lang/rust.git" "rust"
git-repo "https://github.com/phildawes/racer.git" "racer-src"
cd racer-src && cargo build --release
mv racer-src/target/release/racer ./racer

12
scripts/setup-sh.sh Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
source VARS
#
echo "Setting up zsh/bash (zshdb, bashdb)"
if is-mac; then
brew install zshdb bashdb
elif is-arch; then
sudo pacman --noconfirm -S zshdb bashdb
fi