diff options
Diffstat (limited to 'venv-trog.sh')
-rw-r--r-- | venv-trog.sh | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/venv-trog.sh b/venv-trog.sh index 188b751..fc91704 100644 --- a/venv-trog.sh +++ b/venv-trog.sh @@ -8,12 +8,12 @@ echo '-- Run this in a terminal in the real troggle directory: "bash venv-trog.s # use the script os-trog.sh # If you are using Debian, then stick with the default version of python -# If you are using Ubuntu, then it is easy to use a later version of python, e.g. 3.10 or 3.11 +# If you are using Ubuntu, then it is easy to use a later version of python, e.g. 3.11 # NOW we set up troggle PYTHON=python3.10 -VENAME=p10d5 # python3.x and django 3.2 +VENAME=p10d3 # python3.x and django 3.2 echo "** You are logged in as `id -u -n`" echo "The 50MB pip cache will be in /home/`id -u -n`/.cache/" echo "The 150MB venv will created in /home/`id -u -n`/$VENAME/" @@ -79,9 +79,17 @@ ln -s ${TROGDIR}/../drawings drawings if [ -d ${TROGDIR}/../expofiles ]; then ln -s ${TROGDIR}/../expofiles expofiles else - ln -s /mnt/f/expofiles expofiles + if [ ! -d /mnt/f/expofiles ]; then + sudo mkdir /mnt/f + sudo mount -t drvfs F: /mnt/f + else + ln -s /mnt/f/expofiles expofiles + fi fi +echo "### Setting file permissions.. may take a while.." +git config --global --add safe.directory '*' +sudo chmod -r 0777 * echo "### links to expoweb, troggle etc. complete:" ls -tla @@ -134,8 +142,25 @@ echo "### Now do 'cd troggle' 'django-admin' 'python manage.py check' +## this tests if you have set up ssh correcting. Refer to documentation https://expo.survex.com/handbook/computing/keyexchange.html +## you need to follow the Linux instructions. + 'ssh expo@expo.survex.com' + +## the next tests will fail unless ~/expofiles is set correctly to a folder on your machine +## the tests may ALSO fail because of ssh and permissions errors +# Ran 85 tests in 83.492s +# FAILED (failures=5) +## So you will need to run +$sudo chown -Rhv philip:philip ~/$VENAME (if your username is philip) +# and then REBOOT (or at least, exit WSL and terminate and restart WSL) +# because this chmod only takes effect then. + 'python manage.py test -v 2' - './pre-run.sh' + './pre-run.sh' (runs the tests again) + 'python databaseReset.py reset $VENAME' 'python manage.py runserver 0.0.0.0:8000 (and allow access when the firewall window pops up)' " +if [ ! -d /mnt/f/expofiles ]; then +echo '### No valid expofiles directory. Fix this before any tests will work. +fi
\ No newline at end of file |