2021-10-02 12:50:01 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -u
|
|
|
|
|
|
|
|
repositories="/etc /etc/bind/ /usr/share/scripts"
|
|
|
|
|
|
|
|
for repository in ${repositories}; do
|
|
|
|
if [ -d "${repository}/.git" ]; then
|
2022-04-01 15:47:44 +02:00
|
|
|
if [ ${repository} = "/usr/share/scripts" ]; then
|
|
|
|
mount -o remount,rw /usr
|
|
|
|
fi
|
2021-10-02 12:50:01 +02:00
|
|
|
git --git-dir="${repository}/.git" gc --quiet
|
2022-04-01 15:47:44 +02:00
|
|
|
if [ ${repository} = "/usr/share/scripts" ]; then
|
|
|
|
mount -o remount /usr
|
|
|
|
fi
|
2021-10-02 12:50:01 +02:00
|
|
|
fi
|
|
|
|
done
|