Align shell style all over the repo

This commit is contained in:
Lucas 2020-05-03 14:47:27 +00:00
parent afb13d9c9c
commit d5e71c46f7
16 changed files with 113 additions and 86 deletions

View file

@ -39,14 +39,14 @@ while getopts T flag; do
;;
esac
done
shift $(($OPTIND - 1))
shift $((OPTIND - 1))
[ $# -gt 0 ] || usage
: ${ARCHIVE_BASEDIR:=~/tmp/archive}
mkdir -p "$ARCHIVE_BASEDIR"
everything=$ARCHIVE_BASEDIR/everything
test -f "$everything" || touch "$everything"
touch "$everything"
dir=$ARCHIVE_BASEDIR/$(date +%Y/%m/%d)
mkdir -p "$dir" || exit 1
@ -57,7 +57,7 @@ for url; do
outdir=$dir/$sha
if grep -q "^$url\$" "$everything"; then
printf "%s: \"%s\" already fetched.\n" "${0##*/}" "$url" >&2
printf "%s: already fetched %s\n" "${0##*/}" "$url" >&2
printf "%s/file\n" "$(find_dir "$sha")"
continue
fi