2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-02-08 11:28:23 +00:00

debugging install scripts on a new 24.04 machine

This commit is contained in:
2024-12-20 21:24:46 +00:00
parent 1b6333fdef
commit 90ecdda407
6 changed files with 63 additions and 126 deletions

42
venv-trog.sh Executable file → Normal file
View File

@@ -1,53 +1,31 @@
#!/bin/bash
# now using uv, unbelieveably simpler.
# Run this in a terminal in the troggle directory: 'bash venv-trog.sh'
echo '-- Run this in a terminal in the directory above the troggle directory: "bash troggle/venv-trog.sh"'
# Run this in a terminal in ~/expo above the troggle directory: 'bash ~/expo/venv-trog.sh'
echo '-- Run this in a terminal in the directory above the troggle directory: "bash ~/expo/venv-trog.sh"'
# Expects an Ubuntu 22.04 with all the gubbins already installed
# Expects an Ubuntu 24.04 with all the gubbins already installed
# If you have not already installed these on your clean Ubuntu install DO THIS FIRST
# use the script os-trog24.04.sh runniing it in /home/username/
python --version
python3 --version
cd ~/expo/troggle
echo "-- EXPO folder [current directory]: `pwd`"
TROGDIR=$(cd $(dirname $0) && pwd)
echo "-- Troggle folder [this script location]: ${TROGDIR}"
echo "-- Troggle folder: ${TROGDIR}"
cp troggle/pyproject.toml .
cp dev.toml pyproject.toml
cp ~/expo/troggle/_deploy/wsl/localsettingsWSL.py ~/expo/troggle/localsettings.py
uv self update
uv sync
exit 1
# this next is a bit wordy
# uv python list --only-installed
# we are in /home/$USER/expo/
# ln -s ${TROGDIR} troggle
# ln -s ${TROGDIR}/../expoweb expoweb
# ln -s ${TROGDIR}/../loser loser
# ln -s ${TROGDIR}/../drawings drawings
#ln -s ${TROGDIR}/../expofiles expofiles
# fudge for philip's laptop prior to M2 SSD upgrade
if [ ! -d /mnt/d/EXPO ]; then
sudo mkdir /mnt/d
sudo mount -t drvfs D: /mnt/d
fi
if [ -d ${TROGDIR}/../expofiles ]; then
ln -s ${TROGDIR}/../expofiles expofiles
else
ln -s /mnt/d/EXPO/expofiles expofiles
fi
read -p "Press any key to resume ..."
PIP="uv pip"
REQUIRE="requirements.txt"
$PIP freeze > $REQUIRE
$PIP list
uv pip list
echo "Django version:`uv run django-admin --version`"
@@ -55,7 +33,7 @@ echo "### Now do
'[sudo service mysql start]'
'[sudo service mariadb restart]'
'[sudo mysql_secure_installation]'
'cd troggle'
'cd ~/expo/troggle'
'uv run django-admin'
'uv run manage.py check'
## this tests if you have set up ssh correcting. Refer to documentation https://expo.survex.com/handbook/computing/keyexchange.html