-
Notifications
You must be signed in to change notification settings - Fork 20
/
get-dependencies.sh
executable file
·49 lines (38 loc) · 1003 Bytes
/
get-dependencies.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
set -euo pipefail
#
# Add dependencies URLs here
#
DEPENDENCIES="
https://github.com/robert-strandh/cluffer
https://github.com/scymtym/text.editing
https://github.com/s-expressionists/Eclector
https://github.com/s-expressionists/incrementalist
"
PROJECTS_DIRECTORY=${1:-"$HOME/quicklisp/local-projects/"}
if [ ! -d "$PROJECTS_DIRECTORY" ]; then
cat <<EOF
Usage: $0 [PROJECTS_DIRECTORY].
You did not supply a directory to download dependencies into;
the default directory "$PROJECTS_DIRECTORY" does not exist.
EOF
exit 1
fi
pushd "$PROJECTS_DIRECTORY"
for url in $DEPENDENCIES; do
repository_name=`basename $url`
if [ -d "$repository_name" ]; then
echo " * pulling updates for $repository_name";
pushd $repository_name
git pull
popd
else
echo " * cloning $repository_name";
git clone $url
fi
done
cat <<EOF
Done.
Run (ql:register-local-projects) from your REPL to add
any new systems to your environment.
EOF