Compare commits
3
Commits
89d27a2e86
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c4a36c0cd4 | ||
|
|
0487eb1c0c | ||
|
|
1464774831 |
No files matched your search
@@ -1 +0,0 @@
|
|||||||
/root/scripts/space-domains.txt
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
eidfsp02-sgstd
|
||||||
|
eidfsp04-sgpro
|
||||||
|
eidfsp03-sgprodev
|
||||||
|
eidfsp01-sgstddev
|
||||||
@@ -1 +0,0 @@
|
|||||||
/root/scripts/space-project-map
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
eidf130 standard
|
||||||
|
eidf142 standard
|
||||||
|
eidf138 standard
|
||||||
|
eidf092 standard
|
||||||
|
eidf184 standard
|
||||||
|
eidfsp02-sgstd standard
|
||||||
|
eidfsp04-sgpro protected
|
||||||
|
eidfsp03-sgprodev protected
|
||||||
|
eidf017 standard
|
||||||
|
eidf092 standard
|
||||||
|
eidfsp01-sgstddev standard
|
||||||
+4
-11
@@ -12,8 +12,8 @@ function main() {
|
|||||||
|
|
||||||
# Files uploaded to serv-u
|
# Files uploaded to serv-u
|
||||||
local SERVU_BASE="/mnt/os-transfer"
|
local SERVU_BASE="/mnt/os-transfer"
|
||||||
local IMPORT_DIR="$SERVU_BASE/space-landing/Import"
|
local IMPORT_DIR="$SERVU_BASE/space-landing/import"
|
||||||
local EXPORT_DIR="$SERVU_BASE/space-landing/Export"
|
local EXPORT_DIR="$SERVU_BASE/space-landing/export"
|
||||||
local LIN_DIR="/mnt/linux"
|
local LIN_DIR="/mnt/linux"
|
||||||
local WIN_DIR="/mnt/windows"
|
local WIN_DIR="/mnt/windows"
|
||||||
|
|
||||||
@@ -96,19 +96,12 @@ function transfer::import() {
|
|||||||
|
|
||||||
local file=${filepath##*/} # strip directories from path
|
local file=${filepath##*/} # strip directories from path
|
||||||
|
|
||||||
# ensure file has correct format
|
|
||||||
if [[ ! "$file" =~ ^eidf[a-zA-Z0-9]{2,5}-[a-zA-Z0-9]{3,8}-.+$ ]]; then
|
|
||||||
logging::failure "[IMPORT] $file — Filename format invalid"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Ensure filename matches expected format
|
# Ensure filename matches expected format
|
||||||
if [[ ! "$file" =~ ^eidf[a-zA-Z0-9]{2,5}-[a-zA-Z0-9]{3,8}-.+ ]]; then
|
if [[ ! "$file" =~ ^eidf[a-zA-Z0-9]{2,5}-[a-zA-Z0-9]{3,8}-.+$ ]]; then
|
||||||
logging::failure "[IMPORT] $file — Filename format invalid"
|
logging::failure "[IMPORT] $file — eidf prefix wrong or missing"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# example file: eidf123-abc01-file.csv
|
# example file: eidf123-abc01-file.csv
|
||||||
local project="${file%%-*}" # eidf123
|
local project="${file%%-*}" # eidf123
|
||||||
local rest="${file#*-}" # abc01-file.csv
|
local rest="${file#*-}" # abc01-file.csv
|
||||||
|
|||||||
Reference in new issue
Block a user