diff --git a/hedgebak b/hedgebak index 0683d8f..a1fb09e 100755 --- a/hedgebak +++ b/hedgebak @@ -38,8 +38,10 @@ fi while read id; do outfile=`HEDGEDOC_SERVER="$SERVER" HEDGEDOC_COOKIES_FILE="$COOKIE_FILE" hedgedoc export --md "$id"` - echo "$outfile" - git add "$outfile" + if [ "$?" == "0" ]; then + echo "$outfile" + git add "$outfile" + fi done < "$ID_FILE" DATE=`date --utc +"%Y%m%d_%H%M"`