-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathupdate
executable file
·40 lines (31 loc) · 946 Bytes
/
update
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
#!/usr/bin/env bash
set -eu
if [ ! -d grammars ] || [ ! -d tutorials ]; then
printf "%s\n" "Wrong directory? Run as ./update"
exit 1
fi
printf "%s\n" "-- Updating git checkout"
git pull
printf "%s\n" "-- Updating jar files"
./fetch-jars
mkdir -p generated
if [ -d /export/scratch ] && [ ! -d generated/src ]; then
printf "%s\n" "-- Creating initial generated cache symlinks to local disk"
CACHE=/export/scratch/${USER}-deletable-cache
mkdir -p ${CACHE}
if [ ! -O ${CACHE} ]; then
printf "%s\n" "ERROR: You do not own your own generated cache!"
ls -la /export/scratch
exit 1
fi
for dir in bin src ide doc; do
printf "%s\n" ${CACHE}/${dir}
mkdir -p ${CACHE}/${dir}
ln -s ${CACHE}/${dir} generated/${dir}
done
fi
printf "%s\n" "-- Done"
if [ $(git symbolic-ref -q HEAD) != "refs/heads/develop" ]; then
printf "%s\n" "-- REMINDER: You do not currently have 'develop' checked out."
git branch
fi