2023-12-09 13:36:19 +01:00
|
|
|
#!/bin/sh -x
|
2023-12-08 10:36:05 +01:00
|
|
|
|
2023-12-09 12:47:41 +01:00
|
|
|
if [ -z "$SSH_AGENT_PID" ]; then
|
|
|
|
exec ssh-agent "$0" "$@"
|
|
|
|
fi
|
|
|
|
|
2023-12-08 10:36:05 +01:00
|
|
|
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-09 13:36:19 +01:00
|
|
|
cd ~/git || exit
|
2023-12-01 14:26:47 +01:00
|
|
|
|
2023-12-09 13:36:19 +01:00
|
|
|
set +x
|
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
|