fix checking of command status
In the spirit of pr #2589, we correct similar cases where the string "status" instead of `$status` was being tested for a value. In `bin/csv2entry.sh` changed VERSION from "1.1 2024-07-20" to "1.1.1 2024-07-22". In `bin/entry2csv.sh` changed VERSION from "1.1 2024-07-20" to "1.1.1 2024-07-22". In `bin/gen-sitemap.sh` changed VERSION from "1.3.10 2024-07-18" to "1.3.11 2024-07-22". In `bin/gen-status.sh` changed VERSION from "1.5.5 2024-07-18" to "1.5.6 2024-07-22". In `bin/md2html.sh` changed VERSION from "1.5.2 2024-07-18" to "1.5.3 2024-07-22". In `bin/tar-entry.sh` changed VERSION from "1.3.6 2024-04-28" to "1.3.7 2024-07-22". In `bin/tar-year.sh` changed VERSION from "1.2.4 2024-04-28" to "1.2.5 2024-07-22". Performed `make www` to accomplish the above and to test under macOS.
This commit is contained in:
1 parent
7747230c58
commit
354953b530
7 files changed
+34
-34
No files matched your search
+10
-10
@@ -118,7 +118,7 @@ shopt -s lastpipe # explicitly run the last command of the pipe line in the curr
|
||||
|
||||
# set variables referenced in the usage message
|
||||
#
|
||||
export VERSION="1.1 2024-07-20"
|
||||
export VERSION="1.1.1 2024-07-22"
|
||||
NAME=$(basename "$0")
|
||||
export NAME
|
||||
export V_FLAG=0
|
||||
@@ -926,7 +926,7 @@ for YYYY in $(< "$TOP_FILE"); do
|
||||
if [[ -z $NOOP ]]; then
|
||||
awk -f "$MANIFEST_ENTRY_CSV_ENTRY_AWK" "$ENTRY_JSON" >> "$TMP_MANIFEST_CSV"
|
||||
status="$?"
|
||||
if [[ status -ne 0 ]]; then
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: awk -f $MANIFEST_ENTRY_CSV_ENTRY_AWK $ENTRY_JSON >> $TMP_MANIFEST_CSV failed," \
|
||||
"error code: $status" 1>&2
|
||||
exit 8
|
||||
@@ -959,7 +959,7 @@ if [[ -z $NOOP ]]; then
|
||||
fi
|
||||
sort "$TMP_AUTHOR_WIN" -o "$TMP_AUTHOR_WIN"
|
||||
status="$?"
|
||||
if [[ status -ne 0 ]]; then
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: sort $TMP_AUTHOR_WIN -o $TMP_AUTHOR_WIN failed," \
|
||||
"error code: $status" 1>&2
|
||||
exit 8
|
||||
@@ -1028,7 +1028,7 @@ if [[ -z $NOOP ]]; then
|
||||
fi
|
||||
sort -t, -k1d,1 -k2d,2 "$TMP_AUTHOR_WINS_CSV" -o "$TMP_AUTHOR_WINS_CSV"
|
||||
status="$?"
|
||||
if [[ status -ne 0 ]]; then
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: sort -t, -k1d,1 -k2d,2 $TMP_AUTHOR_WINS_CSV -o $TMP_AUTHOR_WINS_CSV failed," \
|
||||
"error code: $status" 1>&2
|
||||
exit 8
|
||||
@@ -1066,7 +1066,7 @@ if [[ -z $NOOP ]]; then
|
||||
mv -f -- "$TMP_AUTHOR_WINS_CSV" "$AUTHOR_WINS_CSV"
|
||||
status="$?"
|
||||
fi
|
||||
if [[ status -ne 0 ]]; then
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: mv -f -- $TMP_AUTHOR_WINS_CSV $AUTHOR_WINS_CSV filed," \
|
||||
"error code: $status" 1>&2
|
||||
exit 8
|
||||
@@ -1218,7 +1218,7 @@ if [[ $V_FLAG -ge 5 ]]; then
|
||||
fi
|
||||
sort "$TMP_AUTHOR_HANDLE_INVENTORY" -o "$TMP_AUTHOR_HANDLE_INVENTORY"
|
||||
status="$?"
|
||||
if [[ status -ne 0 ]]; then
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: sort $TMP_AUTHOR_HANDLE_INVENTORY -o $TMP_AUTHOR_HANDLE_INVENTORY failed," \
|
||||
"error code: $status" 1>&2
|
||||
exit 9
|
||||
@@ -1251,7 +1251,7 @@ if [[ -z $NOOP ]]; then
|
||||
fi
|
||||
sort -t, -k1,1 -k2d,2 -k4n,4 -k3,3 -k5d,8 "$TMP_MANIFEST_CSV" -o "$TMP_MANIFEST_CSV"
|
||||
status="$?"
|
||||
if [[ status -ne 0 ]]; then
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: sort -t, -k1,1 -k2d,2 -k4n,4 -k3,3 -k5d,8 $TMP_MANIFEST_CSV -o $TMP_MANIFEST_CSV failed," \
|
||||
"error code: $status" 1>&2
|
||||
exit 8
|
||||
@@ -1289,7 +1289,7 @@ if [[ -z $NOOP ]]; then
|
||||
mv -f -- "$TMP_MANIFEST_CSV" "$MANIFEST_CSV"
|
||||
status="$?"
|
||||
fi
|
||||
if [[ status -ne 0 ]]; then
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: mv -f -- $TMP_MANIFEST_CSV $MANIFEST_CSV filed," \
|
||||
"error code: $status" 1>&2
|
||||
exit 8
|
||||
@@ -1319,7 +1319,7 @@ if [[ -z $NOOP ]]; then
|
||||
fi
|
||||
sort -t, -k1d,1 -k2d,2 "$TMP_YEAR_PRIZE_CSV" -o "$TMP_YEAR_PRIZE_CSV"
|
||||
status="$?"
|
||||
if [[ status -ne 0 ]]; then
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: sort -t, -k1d,1 -k2d,2 $TMP_YEAR_PRIZE_CSV -o $TMP_YEAR_PRIZE_CSV failed," \
|
||||
"error code: $status" 1>&2
|
||||
exit 8
|
||||
@@ -1357,7 +1357,7 @@ if [[ -z $NOOP ]]; then
|
||||
mv -f -- "$TMP_YEAR_PRIZE_CSV" "$YEAR_PRIZE_CSV"
|
||||
status="$?"
|
||||
fi
|
||||
if [[ status -ne 0 ]]; then
|
||||
if [[ $status -ne 0 ]]; then
|
||||
echo "$0: ERROR: mv -f -- $TMP_YEAR_PRIZE_CSV $YEAR_PRIZE_CSV filed," \
|
||||
"error code: $status" 1>&2
|
||||
exit 8
|
||||
|
||||
Reference in new issue
Block a user