summaryrefslogtreecommitdiffstats
path: root/venv-trog.sh
diff options
context:
space:
mode:
authorPhilip Sargent (laptop) <you@example.com>2023-05-02 14:27:55 +0300
committerPhilip Sargent (laptop) <you@example.com>2023-05-02 14:27:55 +0300
commit8e982bd6bee63d89c286b7d393bfb2b8536e078d (patch)
treef854492bf6f6226bb58dbc2eae0e63ad57b7aee6 /venv-trog.sh
parent783154d24a0033bbda15ebfa4e30744d02c27324 (diff)
downloadtroggle-8e982bd6bee63d89c286b7d393bfb2b8536e078d.tar.gz
troggle-8e982bd6bee63d89c286b7d393bfb2b8536e078d.tar.bz2
troggle-8e982bd6bee63d89c286b7d393bfb2b8536e078d.zip
Fixing new dev machine setup
Diffstat (limited to 'venv-trog.sh')
-rw-r--r--venv-trog.sh25
1 files changed, 11 insertions, 14 deletions
diff --git a/venv-trog.sh b/venv-trog.sh
index a47ab87..2767570 100644
--- a/venv-trog.sh
+++ b/venv-trog.sh
@@ -3,17 +3,16 @@
# Run this in a terminal in the troggle directory: 'bash venv-trog.sh'
echo '-- Run this in a terminal in the real troggle directory: "bash venv-trog.sh"'
-# Expects an Ubuntu 22.04 relatively clean install.
+# Expects an Ubuntu 22.04 (or 20.04) relatively clean install.
# If you have not already installed these on your clean Ubuntu install DO THIS FIRST
# 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.11
-
# NOW we set up troggle
PYTHON=python3.11
-VENAME=p11d3 # python3.x and django 3.2
+VENAME=p11d4 # python3.x and django 4.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/"
@@ -21,14 +20,13 @@ TROGDIR=$(cd $(dirname $0) && pwd)
echo "-- Troggle folder (this script location): ${TROGDIR}"
if [ -d requirements.txt ]; then
- echo "-- No requirements.txt found. Copy it from your most recent installation."
+ echo "-- No requirements.txt found. You should be in the /troggle/ folder. Copy it from your most recent installation."
exit 1
fi
echo ## Using requirements.txt :
cat requirements.txt
echo ##
-
$PYTHON --version
# NOTE that when using a later or earlier verison of python, you MUST also
@@ -79,17 +77,17 @@ ln -s ${TROGDIR}/../drawings drawings
if [ -d ${TROGDIR}/../expofiles ]; then
ln -s ${TROGDIR}/../expofiles expofiles
else
- if [ ! -d /mnt/f/expofiles ]; then
- sudo mkdir /mnt/f
- sudo mount -t drvfs F: /mnt/f
+ if [ ! -d /mnt/d/expofiles ]; then
+ sudo mkdir /mnt/d
+ sudo mount -t drvfs D: /mnt/d
else
- ln -s /mnt/f/expofiles expofiles
+ ln -s /mnt/d/expofiles expofiles
fi
fi
echo "### Setting file permissions.. may take a while.."
git config --global --add safe.directory '*'
-sudo chmod -r 0777 *
+sudo chmod -R 777 *
echo "### links to expoweb, troggle etc. complete:"
ls -tla
@@ -154,8 +152,7 @@ echo "### Now do
## 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)
@@ -167,6 +164,6 @@ $sudo chown -Rhv philip:philip ~/$VENAME (if your username is philip)
'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.
+if [ ! -d /mnt/d/expofiles ]; then
+echo '### No valid expofiles directory on /mnt/d . Fix this before any tests will work.
fi \ No newline at end of file