2023-12-08 10:36:05 +01:00
|
|
|
#!/bin/sh -ex
|
|
|
|
|
|
|
|
ssh-add
|
2023-12-01 14:26:47 +01:00
|
|
|
|
|
|
|
update_repo() {
|
|
|
|
cd "$1" || return
|
|
|
|
printf 'Updating repository \033[1m%s\033[0m...\n' "$1"
|
|
|
|
git pull
|
|
|
|
}
|
|
|
|
|
2023-12-08 10:36:05 +01:00
|
|
|
cd ~/git
|
2023-12-01 14:26:47 +01:00
|
|
|
|
2023-12-08 10:36:05 +01:00
|
|
|
set +ex
|
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
|
2023-12-01 14:26:47 +01:00
|
|
|
update_repo "$i" &
|
|
|
|
done
|
2023-04-13 00:16:36 +02:00
|
|
|
|
2023-12-01 14:26:47 +01:00
|
|
|
wait
|