Skip to content

Commit 4929b76

Browse files
committed
script for linux
1 parent 92899e3 commit 4929b76

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

bin/alkls.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
TARGET_FILE=$0
4+
ORIG=`pwd -P`
5+
6+
7+
cd `dirname $TARGET_FILE`
8+
TARGET_FILE=`basename $TARGET_FILE`
9+
10+
# Iterate down a (possible) chain of symlinks
11+
while [ -L "$TARGET_FILE" ]
12+
do
13+
TARGET_FILE=`readlink $TARGET_FILE`
14+
cd `dirname $TARGET_FILE`
15+
TARGET_FILE=`basename $TARGET_FILE`
16+
done
17+
18+
# Compute the canonicalized name by finding the physical path
19+
# for the directory we're in and appending the target file.
20+
PHYS_DIR=`pwd -P`
21+
cd "$ORIG"
22+
export PATH="$PATH:$PHYS_DIR:$PHYS_DIR/lib"
23+
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PHYS_DIR:$PHYS_DIR/lib"
24+
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$PHYS_DIR:$PHYS_DIR/lib"
25+
java -Djava.library.path="$PHYS_DIR:$PHYS_DIR/lib" -cp "$PHYS_DIR/alk.jar:$PHYS_DIR/lib/com.microsoft.z3.jar" main.LanguageServer "${@:1}"
26+
exit 0

0 commit comments

Comments
 (0)