forked from seq-lang/seq
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·44 lines (37 loc) · 1.27 KB
/
install.sh
File metadata and controls
executable file
·44 lines (37 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
set -e
set -o pipefail
SEQ_INSTALL_DIR=~/.seq
OS=`uname -s | awk '{print tolower($0)}'`
ARCH=`uname -m`
if [ "$OS" != "linux" ] && [ "$OS" != "darwin" ]; then
echo "error: Pre-built binaries only exist for Linux and macOS." >&2
exit 1
fi
if [ "$ARCH" != "x86_64" ]; then
echo "error: Pre-built binaries only exist for x86_64." >&2
exit 1
fi
case "$OS" in
"linux") LIB_PATH_VAR="LD_LIBRARY_PATH" ;;
"darwin") LIB_PATH_VAR="DYLD_LIBRARY_PATH" ;;
*) exit 1 ;;
esac
SEQ_BUILD_ARCHIVE=seq-$OS-$ARCH.tar.gz
SEQ_STDLIB_ARCHIVE=seq-stdlib.tar.gz
mkdir -p $SEQ_INSTALL_DIR
cd $SEQ_INSTALL_DIR
wget -c https://github.com/seq-lang/seq/releases/latest/download/$SEQ_BUILD_ARCHIVE -O - | tar -xz
wget -c https://github.com/seq-lang/seq/releases/latest/download/$SEQ_STDLIB_ARCHIVE -O - | tar -xz
cp build/seqc build/libseq.* build/libseqrt.* .
if [ "$OS" == "linux" ]; then
ln -s `find /usr/lib64/ -type f -name "libbz2.so.1*"` libbz2.so.1.0
ln -s `find /usr/lib64/ -type f -name "libomp.so*"` libomp.so.5
fi
rm -rf build
echo ""
echo "Seq installed at: `pwd`"
echo "Make sure to add the following lines to ~/.bash_profile:"
echo " export PATH=\"`pwd`:\$PATH\""
echo " export SEQ_PATH=\"`pwd`/stdlib\""
echo " export $LIB_PATH_VAR=\"\$$LIB_PATH_VAR:`pwd`\""