-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·55 lines (44 loc) · 1.25 KB
/
setup.sh
File metadata and controls
executable file
·55 lines (44 loc) · 1.25 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
45
46
47
48
49
50
51
52
53
54
55
#!/bin/sh
BIN=$HOME/bin
mkdir -p $BIN
if [ -a $BIN/cs ] ; then
if ! [ -f $BIN/cs ] ; then
echo "$BIN/cs exists but is not a regular file. Not clobbering. Remove $BIN/cs and run this setup script again."
exit 1
elif ! grep -q sbt-launch\\.jar $BIN/cs ; then
echo "$BIN/cs exists, but it does not not appear to be an old conscript file. Not clobbering. Remove $BIN/cs and run this setup script again."
exit 2
else
echo
echo "Existing $BIN/cs found. Will overwrite."
fi
fi
echo "
Fetching current launch configuration...
"
CS=$HOME/.conscript
CSCS=$CS/n8han/conscript/cs
CLC=$CSCS/launchconfig
mkdir -p $CSCS
curl https://raw.github.com/n8han/conscript/master/src/main/conscript/cs/launchconfig \
> $CLC
echo "
[boot]
directory: $CS/boot" >> $CLC
echo "#!/bin/sh
#This is conscript: https://github.com/n8han/conscript
java -jar $CS/sbt-launch.jar @$CLC \"\$@\"" > $BIN/cs
chmod a+x $BIN/cs
LJV=0.11.3
LJ="sbt-launch-$LJV.jar"
if [ ! -f $CS/$LJ ]; then
echo "
Fetching launcher...
"
curl "http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/$LJV/sbt-launch.jar" \
> $CS/$LJ
ln -sf $CS/$LJ $CS/sbt-launch.jar
fi
echo "
conscript installed to $BIN/cs
"