X-Git-Url: http://git.projectaon.org/?p=project-aon.git;a=blobdiff_plain;f=common%2Fscripts%2Flist-bookcodes-by-series.sh;h=8005e41ff71eb9a87e482e7541f01fdcb63be277;hp=88d9924bd2bb94540f036b958e5c7b53022dcb4d;hb=ae3a572980f015a1266cbb3c0c7fe45f696cd8db;hpb=c6338dc3c2d3299fdf71c128a7b707d7a69762dd diff --git a/common/scripts/list-bookcodes-by-series.sh b/common/scripts/list-bookcodes-by-series.sh index 88d9924..8005e41 100755 --- a/common/scripts/list-bookcodes-by-series.sh +++ b/common/scripts/list-bookcodes-by-series.sh @@ -7,19 +7,19 @@ if [ ! -d "$AONDIR" ]; then >&2 echo "Please set the AONDIR environment variable" - exit + exit 1 fi book_db="$AONDIR/common/sqlite/bookcodes.db" for series in $@ do - if [[ ! $series =~ ^[a-z][a-z]$ ]]; then + if [[ ! $series =~ ^[a-z]+$ ]]; then >&2 echo "invalid series" - exit + exit 1 fi - sqlite3 -column -noheader "$book_db" <