handle when $1 not given
This commit is contained in:
parent
4a1d5ade60
commit
516efdf34d
1 changed files with 5 additions and 1 deletions
6
packages/scripts/chpaper.sh
Normal file → Executable file
6
packages/scripts/chpaper.sh
Normal file → Executable file
|
@ -2,7 +2,11 @@
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
DIR="$1"
|
DIR="${1:-}"
|
||||||
|
if [ -z "$DIR" ]; then
|
||||||
|
echo "Usage: $0 <path to directory containing wallpapers>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
if [ ! -d "$DIR" ]; then
|
if [ ! -d "$DIR" ]; then
|
||||||
echo "$DIR: not a directory"
|
echo "$DIR: not a directory"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue