auto up 23:20:55 up 1:52, 2 users, load average: 1.80, 1.92, 1.80

This commit is contained in:
2025-11-01 23:21:09 +01:00
parent 2120f7a12c
commit 07b99ba913

27
shell/up.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# List of directories with git repositories
REPOS=(
"/home/jonas/nixos"
"/home/jonas/dotfiles"
"/home/jonas/.config/nvim"
"/home/jonas/projects/scripts"
"/home/jonas/projects/university"
)
# Commit message
COMMIT_MSG="auto up $(uptime)"
for repo in "${REPOS[@]}"; do
if [ -d "$repo/.git" ]; then
echo "Processing $repo..."
cd "$repo" || continue
git fetch
git add .
git commit -m "$COMMIT_MSG"
git pull --rebase
git push
else
echo "Skipping $repo: not a git repository"
fi
done