X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/xdg-ninja.git/blobdiff_plain/6bc5bfba6622ec5f4dcc226df88df52a99cf2bbc..fbd143278844fdf82060ba0454e2a7d946a702cc:/xdg-ninja.sh diff --git a/xdg-ninja.sh b/xdg-ninja.sh index ed0e8dd..8332207 100755 --- a/xdg-ninja.sh +++ b/xdg-ninja.sh @@ -136,6 +136,9 @@ decode_string() { /' # Replace \n with literal newline and \" with ", normalize number of trailing newlines to 2 } +# Counter to keep track of how many files can be moved +FIXABLE=0 + # Function to handle the formatting of output log() { MODE="$1" @@ -147,6 +150,7 @@ log() { ERR) printf '[%b%s%b]: %b%s%b\n' "${FX_BOLD}${FG_RED}" "$NAME" "${FX_RESET}" "${FX_BOLD}${FX_ITALIC}" "$FILENAME" "${FX_RESET}" + FIXABLE=$((FIXABLE+1)) ;; WARN) @@ -223,3 +227,4 @@ check_programs() { check_programs +exit $FIXABLE