X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/xdg-ninja.git/blobdiff_plain/7838b796e595c02bb80b86ad1e35bfc5bca472d4..fbd143278844fdf82060ba0454e2a7d946a702cc:/xdg-ninja.sh diff --git a/xdg-ninja.sh b/xdg-ninja.sh index f8e12b5..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) @@ -206,7 +210,7 @@ do_check_programs() { " read -r name; read -r filename; read -r movable; read -r help; do check_file "$name" "$filename" "$movable" "$help" done <