Loading of quicklisp

This commit is contained in:
Bob Mottram 2016-12-17 17:41:17 +00:00
parent 965b3179dc
commit 9519b1a5ec
1 changed files with 15 additions and 6 deletions

View File

@ -389,16 +389,25 @@ function install_turtl {
function_check add_ddns_domain function_check add_ddns_domain
add_ddns_domain $TURTL_DOMAIN_NAME add_ddns_domain $TURTL_DOMAIN_NAME
sed -i 's|CCL_DEFAULT_DIRECTORY=.*|CCL_DEFAULT_DIRECTORY=$HOME/ccl|g' /var/www/$TURTL_DOMAIN_NAME/htdocs/ccl/scripts/ccl sed -i 's|CCL_DEFAULT_DIRECTORY=.*|CCL_DEFAULT_DIRECTORY=/usr/local/src/ccl|g' /usr/bin/ccl
sed -i 's|CCL_DEFAULT_DIRECTORY=.*|CCL_DEFAULT_DIRECTORY=$HOME/ccl|g' /var/www/$TURTL_DOMAIN_NAME/htdocs/ccl/scripts/ccl64 sed -i 's|CCL_DEFAULT_DIRECTORY=.*|CCL_DEFAULT_DIRECTORY=/usr/local/src/ccl|g' /usr/bin/ccl64
adduser --disabled-login --home=/var/www/$TURTL_DOMAIN_NAME/htdocs --gecos 'turtl' turtl adduser --disabled-login --home=/var/www/$TURTL_DOMAIN_NAME/htdocs --gecos 'turtl' turtl
cp /usr/local/src/asdf.lisp /var/www/$TURTL_DOMAIN_NAME/htdocs
cp /usr/local/src/quicklisp.lisp /var/www/$TURTL_DOMAIN_NAME/htdocs
echo '(load (compile-file "asdf.lisp"))' > /var/www/$TURTL_DOMAIN_NAME/htdocs/install.lisp
echo '(load (compile-file "quicklisp.lisp"))' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/install.lisp
echo '(quicklisp-quickstart:install)' >> install.lisp
echo '(ql:add-to-init-file)' >> install.lisp
chown -R turtl:turtl /var/www/$TURTL_DOMAIN_NAME/htdocs chown -R turtl:turtl /var/www/$TURTL_DOMAIN_NAME/htdocs
check_architecture=$(uname -a) check_architecture=$(uname -a)
if [[ "$check_architecture" == *"64"* && "$check_architecture" != *"arm"* ]]; then if [[ "$check_architecture" == *"64"* && "$check_architecture" != *"arm"* ]]; then
su -c '$HOME/ccl/scripts/ccl --load install.lisp --eval "(quit)"' - turtl su -c '/usr/bin/ccl64 --load install.lisp --eval "(quit)"' - turtl
else else
su -c '$HOME/ccl/scripts/ccl64 --load install.lisp --eval "(quit)"' - turtl su -c '/usr/bin/ccl --load install.lisp --eval "(quit)"' - turtl
fi fi
echo "(pushnew \"./\" asdf:*central-registry* :test #'equal)" > /var/www/$TURTL_DOMAIN_NAME/htdocs/api/launch.lisp echo "(pushnew \"./\" asdf:*central-registry* :test #'equal)" > /var/www/$TURTL_DOMAIN_NAME/htdocs/api/launch.lisp
@ -419,8 +428,8 @@ function install_turtl {
echo '(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname))))' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/.ccl-init.lisp echo '(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname))))' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/.ccl-init.lisp
echo ' (when (probe-file quicklisp-init)' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/.ccl-init.lisp echo ' (when (probe-file quicklisp-init)' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/.ccl-init.lisp
echo ' (load quicklisp-init)))' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/.ccl-init.lisp echo ' (load quicklisp-init)))' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/.ccl-init.lisp
echo '(cwd "$HOME/api")' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/.ccl-init.lisp echo '(cwd "~/api")' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/.ccl-init.lisp
echo '(load "$HOME/api/launch")' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/.ccl-init.lisp echo '(load "~/api/launch")' >> /var/www/$TURTL_DOMAIN_NAME/htdocs/.ccl-init.lisp
chmod a+w /var/www/$TURTL_DOMAIN_NAME/htdocs chmod a+w /var/www/$TURTL_DOMAIN_NAME/htdocs
chown -R turtl:turtl /var/www/$TURTL_DOMAIN_NAME/htdocs chown -R turtl:turtl /var/www/$TURTL_DOMAIN_NAME/htdocs