Add demo mode paths
This commit is contained in:
@@ -59,6 +59,7 @@
|
|||||||
# @option -h | --help Print help message and exit (overrides other options)
|
# @option -h | --help Print help message and exit (overrides other options)
|
||||||
|
|
||||||
DEBUG=1 # Turn debugging ON by default during development
|
DEBUG=1 # Turn debugging ON by default during development
|
||||||
|
DEMO=1 # Turn demo mode on (uses demo dirs instead of production paths)
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|
||||||
# @section Libraries
|
# @section Libraries
|
||||||
@@ -1597,7 +1598,10 @@ main() {
|
|||||||
# Find a scans directory
|
# Find a scans directory
|
||||||
# TODO change back for production, avoid actual scan dirs during testing
|
# TODO change back for production, avoid actual scan dirs during testing
|
||||||
# local scans_heirarchy=("./scans" "/mnt/data/scans" "/mnt/data/ExpJobs" "./scans")
|
# local scans_heirarchy=("./scans" "/mnt/data/scans" "/mnt/data/ExpJobs" "./scans")
|
||||||
local scans_heirarchy=( "$SCANS_DIR" "./scans" "/mnt/data/scans" "./scans")
|
local scans_heirarchy=( "$SCANS_DIR" "./scans" "/mnt/data/scans" "templates/scans-demo" "./scans")
|
||||||
|
|
||||||
|
# In demo mode prepend the array with the demo scans dir
|
||||||
|
((DEMO)) && scans_heirarchy=("templates/scans-demo" "${scans_heirarchy[@]}")
|
||||||
|
|
||||||
[[ -z $SCANS_DIR ]] && for d in "${scans_heirarchy[@]}"; do
|
[[ -z $SCANS_DIR ]] && for d in "${scans_heirarchy[@]}"; do
|
||||||
if [[ -d $d ]]; then
|
if [[ -d $d ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user