Add debugging output
This commit is contained in:
@@ -1496,7 +1496,7 @@ main() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if ! [[ -d $SCANS_DIR ]]; then
|
if ! [[ -d $SCANS_DIR ]]; then
|
||||||
# This is not somethign we do often, so ask
|
# This is not something we do often, so ask
|
||||||
if ask "Create the scans directory: $SCANS_DIR?"; then
|
if ask "Create the scans directory: $SCANS_DIR?"; then
|
||||||
mkdir -p "$SCANS_DIR"
|
mkdir -p "$SCANS_DIR"
|
||||||
else
|
else
|
||||||
@@ -1510,7 +1510,6 @@ main() {
|
|||||||
|
|
||||||
local out_heirarchy=("$(dirname "$SCANS_DIR")/out" "$SCRIPT_DIR/out" "/mnt/data/out")
|
local out_heirarchy=("$(dirname "$SCANS_DIR")/out" "$SCRIPT_DIR/out" "/mnt/data/out")
|
||||||
for d in "${out_heirarchy[@]}"; do
|
for d in "${out_heirarchy[@]}"; do
|
||||||
debug "Checking if $d exists in Scans directory heirarchy"
|
|
||||||
if [[ -d $d ]]; then
|
if [[ -d $d ]]; then
|
||||||
debug "Using output directory: $d"
|
debug "Using output directory: $d"
|
||||||
declare -g OUT_DIR="$d"
|
declare -g OUT_DIR="$d"
|
||||||
@@ -1518,6 +1517,15 @@ main() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [[ -z $OUT_DIR ]]; then
|
||||||
|
echo "No output directory found"
|
||||||
|
if ask "Create $SCRIPT_DIR/out? "; then
|
||||||
|
mkdir "$SCRIPT_DIR/out"
|
||||||
|
else
|
||||||
|
err "No output directory, but attempting to continue..."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Set the automatic project directory prefix
|
# Set the automatic project directory prefix
|
||||||
PROJECT_USER="$(whoami)"
|
PROJECT_USER="$(whoami)"
|
||||||
PROJECT_PREFIX="${DATE}_${PROJECT_USER}" # reversed these so easier to sort and parse date
|
PROJECT_PREFIX="${DATE}_${PROJECT_USER}" # reversed these so easier to sort and parse date
|
||||||
|
|||||||
Reference in New Issue
Block a user