2024-04-12 09:39:27 +02:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
[ -z "$SSH_AGENT_PID" ] && exec ssh-agent -- "$0" "$@"
|
2023-12-08 10:36:05 +01:00
|
|
|
ssh-add
|
2023-12-01 14:26:47 +01:00
|
|
|
|
|
|
|
update_repo() {
|
2024-04-12 09:39:27 +02:00
|
|
|
cd -- "$1" || return
|
2023-12-01 14:26:47 +01:00
|
|
|
printf 'Updating repository \033[1m%s\033[0m...\n' "$1"
|
|
|
|
git pull
|
|
|
|
}
|
|
|
|
|
2023-12-09 13:36:19 +01:00
|
|
|
cd ~/git || exit
|
2023-12-01 14:26:47 +01:00
|
|
|
|
|
|
|
for i in *; do
|
|
|
|
while [ "$(jobs -p | wc -l)" -ge 4 ]; do
|
|
|
|
sleep 1
|
2023-05-03 08:06:35 +02:00
|
|
|
done
|
2024-04-12 09:39:27 +02:00
|
|
|
|
2023-12-01 14:26:47 +01:00
|
|
|
update_repo "$i" &
|
|
|
|
done
|
|
|
|
wait
|