adding abnormal termination for errors
[project-aon.git] / common / scripts / list-bookcodes-all.sh
1 #!/usr/bin/env bash
2 #
3 # List all bookcodes.
4
5 if [ ! -d "$AONDIR" ]; then
6     >&2 echo "Please set the AONDIR environment variable"
7     exit 1
8 fi
9
10 book_db="$AONDIR/common/sqlite/bookcodes.db"
11
12 sqlite3 -column -noheader "$book_db" "select book from bookcodes order by book"