-
Notifications
You must be signed in to change notification settings - Fork 12
/
cando-apptainer-install
executable file
·30 lines (25 loc) · 1.48 KB
/
cando-apptainer-install
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
#!/usr/bin/env bash
mkdir -p "$HOME/.local/bin" # TODO Check to see if it is in the path
if [ ! -f "$HOME/quicklisp/setup.lisp" ]; then
echo "Installing Quicklisp..."
tmpfile=$(mktemp)
curl -fsLo $tmpfile https://beta.quicklisp.org/quicklisp.lisp
clasp --non-interactive --load $tmpfile --eval "(quicklisp-quickstart:install)" --eval "(ql-util:without-prompting (ql:add-to-init-file))"
rm $tmpfile
elif [ ! -f "$HOME/.clasprc" ]; then
echo "Creating clasprc..."
clasp --non-interactive --load $HOME/quicklisp/setup.lisp --eval "(ql-util:without-prompting (ql:add-to-init-file))"
fi
if ! [ -f ~/.config/common-lisp/source-registry.conf.d/apptainer.conf ]; then
echo "The file ~/.config/common-lisp/source-registry.conf.d/apptainer.conf is missing - creating it"
mkdir -p ~/.config/common-lisp/source-registry.conf.d
echo "(:tree \"/home/cando/common-lisp/\")" >~/.config/common-lisp/source-registry.conf.d/apptainer.conf
else
echo "The file ~/.config/common-lisp/source-registry.conf.d/apptainer.conf already exists"
cat ~/.config/common-lisp/source-registry.conf.d/apptainer.conf
fi
echo "Updating Quicklisp..."
clasp --non-interactive --eval "(unless (ql-dist:find-dist \"quickclasp\") (ql-dist:install-dist \"http://quickclasp.thirdlaw.tech/quickclasp.txt\" :prompt nil))" \
--eval "(ql:update-all-dists :prompt nil)"
#echo "Installing CANDO user features..."
#cando --eval "(ql:quickload :cando-user-install)" --eval "(cando-user-install:install)" --eval "(sys:quit)"