Update grs.sh
This commit is contained in:
parent
6cfd44b100
commit
926c83cbd7
12
grs.sh
12
grs.sh
@ -28,16 +28,28 @@ for repository in *; do
|
||||
cd ..
|
||||
echo "$log" >> "$logPath"
|
||||
|
||||
if [ "$gitOutput" == "" ]; then
|
||||
cd "repositories/$repository"
|
||||
gitURL=$(git config --get remote.origin.url)
|
||||
cd ..
|
||||
rm -rf "$repository"
|
||||
gitOutput=$(git clone --recursive $gitURL)
|
||||
cd ..
|
||||
if [ "$gitOutput" == "" ]; then
|
||||
log=$(echo [$(date +"%Y-%m-%d %H:%M:%S")] Unable to check for updates to \"$repository\")
|
||||
echo "$log"
|
||||
echo "$log" >> "$logPath"
|
||||
echo >> "$logPath"
|
||||
|
||||
cp -rf "snapshots/$repository" repositories
|
||||
|
||||
cd repositories
|
||||
continue;
|
||||
fi
|
||||
|
||||
echo "$gitOutput"
|
||||
fi
|
||||
|
||||
echo "$gitOutput" >> "$logPath"
|
||||
|
||||
snapshotSize=$(($(du -sb "snapshots/$repository" | cut -f1) - $(du -sb "snapshots/$repository/.git" | cut -f1)))
|
||||
|
Loading…
Reference in New Issue
Block a user