improve bin/cvt-submission.sh, use umask 0022 for new year and new dir
This commit is contained in:
1 parent
f1f0993cf9
commit
3bbbb7797e
3 files changed
+23
-8
No files matched your search
+11
-6
@@ -124,7 +124,7 @@ export LC_ALL="C"
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="2.0.4 2025-05-18"
|
export VERSION="2.0.5 2025-05-18"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -848,6 +848,11 @@ fi
|
|||||||
export ENTRY_PATH="$1"
|
export ENTRY_PATH="$1"
|
||||||
|
|
||||||
|
|
||||||
|
# set umask to avoid group writable files
|
||||||
|
#
|
||||||
|
umask 0022
|
||||||
|
|
||||||
|
|
||||||
# if -i input_data, replace stdin with the input data file
|
# if -i input_data, replace stdin with the input data file
|
||||||
#
|
#
|
||||||
if [[ -n $INPUT_DATA_FILE ]]; then
|
if [[ -n $INPUT_DATA_FILE ]]; then
|
||||||
@@ -1424,21 +1429,21 @@ fi
|
|||||||
#
|
#
|
||||||
if [[ $V_FLAG -ge 1 ]]; then
|
if [[ $V_FLAG -ge 1 ]]; then
|
||||||
echo "$0: debug[1]: about to run: $CHKENTRY_TOOL -v 1" \
|
echo "$0: debug[1]: about to run: $CHKENTRY_TOOL -v 1" \
|
||||||
"-i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig" \
|
"-i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig -i .path" \
|
||||||
"-- $YYYY_DIR" 1>&2
|
"-- $YYYY_DIR" 1>&2
|
||||||
"$CHKENTRY_TOOL" -v 1 -i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig -- "$YYYY_DIR"
|
"$CHKENTRY_TOOL" -v 1 -i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig -i .path -- "$YYYY_DIR"
|
||||||
status="$?"
|
status="$?"
|
||||||
if [[ $status -ne 0 ]]; then
|
if [[ $status -ne 0 ]]; then
|
||||||
echo "$0: ERROR: $CHKENTRY_TOOL -v 1 -i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig" \
|
echo "$0: ERROR: $CHKENTRY_TOOL -v 1 -i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig -i .path" \
|
||||||
"-- $YYYY_DIR failed," \
|
"-- $YYYY_DIR failed," \
|
||||||
"error code: $status" 1>&2
|
"error code: $status" 1>&2
|
||||||
exit 7
|
exit 7
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
"$CHKENTRY_TOOL" -i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig -- "$YYYY_DIR"
|
"$CHKENTRY_TOOL" -i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig -i .path -- "$YYYY_DIR"
|
||||||
status="$?"
|
status="$?"
|
||||||
if [[ $status -ne 0 ]]; then
|
if [[ $status -ne 0 ]]; then
|
||||||
echo "$0: $CHKENTRY_TOOL -i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig" \
|
echo "$0: $CHKENTRY_TOOL -i .auth.json.xz -i .prev -i .submit.sh -i .txz -i .num.sh -i .orig -i .path" \
|
||||||
"-- $YYYY_DIR failed," \
|
"-- $YYYY_DIR failed," \
|
||||||
"error code: $status" 1>&2
|
"error code: $status" 1>&2
|
||||||
exit 7
|
exit 7
|
||||||
|
|||||||
+6
-1
@@ -107,7 +107,7 @@ export LC_ALL="C"
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="2.0.0 2025-03-13"
|
export VERSION="2.0.1 2025-05-18"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -214,6 +214,11 @@ fi
|
|||||||
export ENTRY_PATH="$1"
|
export ENTRY_PATH="$1"
|
||||||
|
|
||||||
|
|
||||||
|
# set umask to avoid group writable files
|
||||||
|
#
|
||||||
|
umask 0022
|
||||||
|
|
||||||
|
|
||||||
# verify that we have a topdir directory
|
# verify that we have a topdir directory
|
||||||
#
|
#
|
||||||
REPO_NAME=$(basename "$REPO_TOP_URL")
|
REPO_NAME=$(basename "$REPO_TOP_URL")
|
||||||
|
|||||||
+6
-1
@@ -106,7 +106,7 @@ export LC_ALL="C"
|
|||||||
|
|
||||||
# set variables referenced in the usage message
|
# set variables referenced in the usage message
|
||||||
#
|
#
|
||||||
export VERSION="2.0.0 2025-03-13"
|
export VERSION="2.0.1 2025-05-18"
|
||||||
NAME=$(basename "$0")
|
NAME=$(basename "$0")
|
||||||
export NAME
|
export NAME
|
||||||
export V_FLAG=0
|
export V_FLAG=0
|
||||||
@@ -318,6 +318,11 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# set umask to avoid group writable files
|
||||||
|
#
|
||||||
|
umask 0022
|
||||||
|
|
||||||
|
|
||||||
# verify that we have a topdir directory
|
# verify that we have a topdir directory
|
||||||
#
|
#
|
||||||
REPO_NAME=$(basename "$REPO_TOP_URL")
|
REPO_NAME=$(basename "$REPO_TOP_URL")
|
||||||
|
|||||||
Reference in new issue
Block a user