mirror of
https://github.com/Ascyii/scripts.git
synced 2026-01-01 04:44:24 -05:00
auto up 00:00:12 up 0:08, 2 users, load average: 1.56, 0.92, 0.48
This commit is contained in:
31
shell/up.sh
31
shell/up.sh
@@ -12,19 +12,28 @@ REPOS=(
|
||||
# Commit message
|
||||
COMMIT_MSG="auto up $(uptime)"
|
||||
|
||||
for repo in "${REPOS[@]}"; do
|
||||
process_repo() {
|
||||
local repo="$1"
|
||||
|
||||
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
|
||||
echo "Processing $repo..."
|
||||
(
|
||||
cd "$repo" || exit
|
||||
git fetch
|
||||
git add .
|
||||
git commit -m "$COMMIT_MSG" >/dev/null 2>&1 || true
|
||||
git pull --rebase
|
||||
git push
|
||||
echo "Done: $repo"
|
||||
)
|
||||
else
|
||||
echo "Skipping $repo: not a git repository"
|
||||
fi
|
||||
}
|
||||
|
||||
for repo in "${REPOS[@]}"; do
|
||||
process_repo "$repo" &
|
||||
done
|
||||
|
||||
wait
|
||||
echo "All repositories processed."
|
||||
|
||||
Reference in New Issue
Block a user