- -h, --help show this help message
- -l, --list list installed cookie files
- -c FILE, --cookie FILE specify cookie file
- -n LENGTH, --min LENGTH specify min fortune length
- -N LENGTH, --max LENGTH specify max fortune length
+ -h, --help show this help message
+ -l, --list list installed cookie files
+ -c FILE, --cookie FILE specify cookie file
+ -n LENGTH, --min LENGTH specify min fortune length
+ -N LENGTH, --max LENGTH specify max fortune length
- echo "ERROR: directory given, please provide a file or glob of files"
- exit 2
+ parse_err "ERROR: directory given, please provide a file or glob of files"
+}
+
+[ "$(find $FILE -maxdepth 1 -print -quit 2> /dev/null)" ] || {
+ parse_err "ERROR: no such file or directory"