adding abnormal termination for errors
[project-aon.git] / common / scripts / list-bookcodes-by-series.sh
index 88d9924..9ab6c92 100755 (executable)
@@ -7,7 +7,7 @@
 
 if [ ! -d "$AONDIR" ]; then
     >&2 echo "Please set the AONDIR environment variable"
-    exit
+    exit 1
 fi
 
 book_db="$AONDIR/common/sqlite/bookcodes.db"
@@ -16,7 +16,7 @@ for series in $@
 do
     if [[ ! $series =~ ^[a-z][a-z]$ ]]; then
         >&2 echo "invalid series"
-        exit
+        exit 1
     fi
 
     sqlite3 -column -noheader "$book_db" <<EOF