-
Notifications
You must be signed in to change notification settings - Fork 21
/
install.sh
34 lines (25 loc) · 615 Bytes
/
install.sh
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
#!/bin/sh
go_quickjs="github.com/wspl/go-quickjs"
install_dir="$GOPATH/src/$go_quickjs"
quickjs="https://bellard.org/quickjs/quickjs-2019-07-28.tar.xz"
old_pwd=$(pwd)
if test -f "quickjs.go"; then
install_dir=$(pwd)
else
go get -d $go_quickjs
cd $install_dir
fi
rm -rf ./libquickjs.a
rm -rf ./quickjs-source
wget -O quickjs-source.tar.xz $quickjs
mkdir quickjs-source
tar xvf quickjs-source.tar.xz -C quickjs-source
cd quickjs-source/quickjs*
cp quickjs.h $install_dir
cp quickjs-libc.h $install_dir
sed -i -e '37d' ./Makefile
make
cp libquickjs.a $install_dir
cd $install_dir
go install
cd $old_pwd