From: Jonathan Blake Date: Thu, 15 Feb 2018 15:34:14 +0000 (+0000) Subject: adding abnormal termination for errors X-Git-Tag: 20180215~4 X-Git-Url: http://git.projectaon.org/?p=project-aon.git;a=commitdiff_plain;h=7d3e9ca54e0cb51922b34659b920e61ee3a6e8d2 adding abnormal termination for errors git-svn-id: https://projectaon.org/data/trunk@2694 f6f3e2d7-ff33-0410-aaf5-b4bee2cdac11 --- diff --git a/common/scripts/copy-all-formats.sh b/common/scripts/copy-all-formats.sh index 3440ad9..f22df65 100755 --- a/common/scripts/copy-all-formats.sh +++ b/common/scripts/copy-all-formats.sh @@ -11,7 +11,7 @@ if [ ! -d "$AONDIR" ]; then >&2 echo "Please set the AONDIR environment variable" - exit + exit 1 fi BASE_DIR="$AONDIR/common/scripts" diff --git a/common/scripts/copy-ebooks.sh b/common/scripts/copy-ebooks.sh index aea05d5..1e76fc5 100755 --- a/common/scripts/copy-ebooks.sh +++ b/common/scripts/copy-ebooks.sh @@ -11,13 +11,13 @@ if [ ! -d "$AONDIR" ]; then >&2 echo "Please set the AONDIR environment variable" - exit + exit 1 fi CURR_DIR=`pwd` if [ "$AONDIR" -ef "$CURR_DIR" ]; then >&2 echo "Current directory is the same as AONDIR: giving up" - exit + exit 1 fi BASE_DIR="$AONDIR/common/epub" diff --git a/common/scripts/copy-svg.sh b/common/scripts/copy-svg.sh index 8498c4a..a057dc4 100755 --- a/common/scripts/copy-svg.sh +++ b/common/scripts/copy-svg.sh @@ -11,13 +11,13 @@ if [ ! -d "$AONDIR" ]; then >&2 echo "Please set the AONDIR environment variable" - exit + exit 1 fi CURR_DIR=`pwd` if [ "$AONDIR" -ef "$CURR_DIR" ]; then >&2 echo "Current directory is the same as AONDIR: giving up" - exit + exit 1 fi book_db="$AONDIR/common/sqlite/bookcodes.db" diff --git a/common/scripts/copy-xhtml.sh b/common/scripts/copy-xhtml.sh index ab24393..0dde264 100755 --- a/common/scripts/copy-xhtml.sh +++ b/common/scripts/copy-xhtml.sh @@ -11,13 +11,13 @@ if [ ! -d "$AONDIR" ]; then >&2 echo "Please set the AONDIR environment variable" - exit + exit 1 fi CURR_DIR=`pwd` if [ "$AONDIR" -ef "$CURR_DIR" ]; then >&2 echo "Current directory is the same as AONDIR: giving up" - exit + exit 1 fi book_db="$AONDIR/common/sqlite/bookcodes.db" diff --git a/common/scripts/list-bookcodes-all.sh b/common/scripts/list-bookcodes-all.sh index 043835b..8f738e3 100755 --- a/common/scripts/list-bookcodes-all.sh +++ b/common/scripts/list-bookcodes-all.sh @@ -4,7 +4,7 @@ if [ ! -d "$AONDIR" ]; then >&2 echo "Please set the AONDIR environment variable" - exit + exit 1 fi book_db="$AONDIR/common/sqlite/bookcodes.db" diff --git a/common/scripts/list-bookcodes-by-lang.sh b/common/scripts/list-bookcodes-by-lang.sh index edf62bf..43d1d79 100755 --- a/common/scripts/list-bookcodes-by-lang.sh +++ b/common/scripts/list-bookcodes-by-lang.sh @@ -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 lang in $@ do if [[ ! $lang =~ ^[a-z][a-z]$ ]]; then >&2 echo "invalid language" - exit + exit 1 fi sqlite3 -column -noheader "$book_db" <&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" <