Compare commits

..

3 Commits

Author SHA1 Message Date
saundersp
c4574e6c7c mv_docker.sh : Better shebang and Added set -e flag 2025-08-14 21:20:12 +02:00
saundersp
31506b049a pull.sh : Quiter output and can now add custom directories to pull 2025-08-14 21:19:10 +02:00
saundersp
a036c42fbd update_req.sh : Quieter output 2025-08-14 21:10:29 +02:00
3 changed files with 26 additions and 11 deletions

View File

@@ -1,6 +1,8 @@
#!/bin/bash
#!/usr/bin/env bash
WSL_DIR=/d/WSL2
set -e
WSL_DIR='/d/WSL2'
WSLS="$(wsl --list | sed 1d | cut -d' ' -f 1 | sed $'s/[^[:print:]\t]//g' | head -n -1)"

22
pull.sh
View File

@@ -9,18 +9,28 @@ __r__(){
done
}
cd ..
for d in *; do
cd "$d" || continue
log_git_pull(){
directory="$1"
test ! -d "$directory" && return
cd "$directory"
PULL_LOG=$(script -q /dev/null -c 'git pull')
if [ "$PULL_LOG" != "$(env printf 'Already up to date.\r\n')" ]; then
env printf "$(__r__ 40)┐\n"
env printf "│ %-38s │\n" "$d"
env printf "│ %-38s │\n" "$directory"
env printf "$(__r__ 40 '─')┘\n"
echo "$PULL_LOG"
fi
cd ..
cd - >> /dev/null
}
for directory in ../*; do
log_git_pull "$directory"
done
log_git_pull "$HOME"/git/lean4game/games/djvelleman/stg4
log_git_pull "$HOME"/git/lean4game/games/hhu-adam/robo
log_git_pull "$HOME"/git/lean4game/games/jadabouhawili/knightsandknaves-lean4game
log_git_pull "$HOME"/git/lean4game/games/leanprover-community/nng4
log_git_pull "$HOME"/git/lean4game/games/trequetrum/lean4game-logic

View File

@@ -22,10 +22,13 @@ python -m venv --upgrade-deps "$VENV_PATH"
if [ -f "$VENV_PATH"/Scripts/activate ]; then . "$VENV_PATH"/Scripts/activate
elif [ -f "$VENV_PATH"/bin/activate ]; then . "$VENV_PATH"/bin/activate
else exit 1; fi
pip install --disable-pip-version pur
pip install --disable-pip-version -q pur
fd requirements.txt ~ | while read -r filename; do
header "$(realpath "$filename" | sed "s,$HOME,~,")"
pur -r "$filename"
LOG=$(pur -r "$filename")
if [ "$LOG" != "$(env printf 'All requirements up-to-date.\n')" ]; then
header "$(realpath "$filename" | sed "s,$HOME,~,")"
echo "$LOG" | sed '$ d'
fi
done
deactivate
rm -rf "$VENV_PATH"