Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add note about usage.
  • Loading branch information
Christoph Dittmann committed Jun 4, 2011
1 parent 6c8058e commit b1f9e00
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions check_and_update_checksums.sh
Expand Up @@ -43,6 +43,19 @@ if [[ $base = --nocheck ]]; then
nocheck=1
fi

if [[ ! -d $base || ( $# -ne 1 && $# -ne 0 ) ]]; then
echo "Usage: $(basename "$0") [--nocheck] [directory]"
echo '
Verifies and updates checksum files recursively starting from the
given directory. If no directory is given, start from the current
directory.
With --nocheck no checksums are verified, only existence of files is
checked. In this mode checksum files may still be updated if files or
checksums are missing.'
exit 0
fi

if [[ $nocheck ]]; then
printf '** Will check for missing files and missing checkums starting from %s\n' "$base"
echo '** The checksums themselves will *not* be verified!'
Expand Down

0 comments on commit b1f9e00

Please sign in to comment.