diff --git a/grs.sh b/grs.sh index 4c73875..b48e118 100644 --- a/grs.sh +++ b/grs.sh @@ -23,10 +23,21 @@ for repository in *; do gitOutput=$(git pull --recurse-submodules=on-demand) echo "$gitOutput" cd .. - if [ "$gitOutput" == "Already up to date." ] || [ "$gitOutput" == "" ]; then continue; fi + if [ "$gitOutput" == "Already up to date." ]; then continue; fi cd .. echo "$log" >> "$logPath" + + 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" + + cd repositories + continue; + fi + echo "$gitOutput" >> "$logPath" snapshotSize=$(($(du -sb "snapshots/$repository" | cut -f1) - $(du -sb "snapshots/$repository/.git" | cut -f1)))