sync: 2026-09-20 22:53

This commit is contained in:
Benji committed 2026-09-20 22:53:06 +02:00
1 parent da74434cd4
commit 6ae5b1c506
1 file changed
+9 -2
+9 -2
View File
@@ -1,6 +1,13 @@
#!/bin/sh #!/bin/sh
TARGET_DIR="$HOME/Documents/COURS" # Set PATH so cron can find git, date, ssh, etc.
export PATH="/usr/local/bin:/usr/bin:/bin"
# Explicitly set target directory (don't rely on $HOME in cron)
TARGET_DIR="/home/benji/Documents/COURS"
# If using SSH keys, specify the key for Git
export GIT_SSH_COMMAND="ssh -i /home/benji/.ssh/grond -o IdentitiesOnly=yes"
# Navigate to target directory # Navigate to target directory
cd "$TARGET_DIR" || { cd "$TARGET_DIR" || {
@@ -8,7 +15,7 @@ cd "$TARGET_DIR" || {
exit 1 exit 1
} }
# Pull remote changes rebase-style to prevent messy merge commits # Pull remote changes rebase-style
git pull --rebase --autostash || { git pull --rebase --autostash || {
echo "Git pull failed" echo "Git pull failed"
exit 1 exit 1