Unify shell script style

This commit is contained in:
Lucas 2019-12-08 18:14:46 +00:00
parent 8d3ae231bb
commit c84c0e3a99
11 changed files with 81 additions and 83 deletions

View file

@ -1,5 +1,5 @@
#!/bin/sh
# env
# fetch
# Written in 2019 by Lucas
# CC0 1.0 Universal/Public domain - No rights reserved
#
@ -9,9 +9,10 @@
# warranty. You should have received a copy of the CC0 Public Domain
# Dedication along with this software. If not, see
# <http://creativecommons.org/publicdomain/zero/1.0/>.
usage()
{
printf "Usage: %s [-T] URL [URLs...]\n" "${0##*/}">&2
printf "Usage: %s [-T] URL [URL ...]\n" "${0##*/}">&2
exit 1
}
@ -34,9 +35,7 @@ while getopts T flag; do
esac
done
shift $(($OPTIND - 1))
if [ $# -eq 0 ]; then
usage
fi
[ $# -gt 0 ] || usage
: ${ARCHIVE_BASEDIR:=~/tmp/archive}
mkdir -p "$ARCHIVE_BASEDIR"