Compare commits
7
Commits
9cde8eb83d
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c4a36c0cd4 | ||
|
|
0487eb1c0c | ||
|
|
1464774831 | ||
|
|
89d27a2e86 | ||
|
|
a12f8a203c | ||
|
|
3fa36c6e22 | ||
|
|
678afed315 |
No files matched your search
@@ -0,0 +1,2 @@
|
||||
log/
|
||||
emails/
|
||||
@@ -0,0 +1,4 @@
|
||||
eidfsp02-sgstd
|
||||
eidfsp04-sgpro
|
||||
eidfsp03-sgprodev
|
||||
eidfsp01-sgstddev
|
||||
@@ -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
|
||||
+5
-12
@@ -12,12 +12,12 @@ function main() {
|
||||
|
||||
# Files uploaded to serv-u
|
||||
local SERVU_BASE="/mnt/os-transfer"
|
||||
local IMPORT_DIR="$SERVU_BASE/space-landing/Import"
|
||||
local EXPORT_DIR="$SERVU_BASE/space-landing/Export"
|
||||
local IMPORT_DIR="$SERVU_BASE/space-landing/import"
|
||||
local EXPORT_DIR="$SERVU_BASE/space-landing/export"
|
||||
local LIN_DIR="/mnt/linux"
|
||||
local WIN_DIR="/mnt/windows"
|
||||
|
||||
[[ -d "/opt/os-transfer" ]] && cd "/opt/os-transfer"
|
||||
cd "/opt/os-transfer" || { echo "Cannot cd to /opt/os-transfer"; exit; }
|
||||
|
||||
local SPACE_PROJECT_MAP="./space-project-map"
|
||||
[[ -f "$SPACE_PROJECT_MAP" ]] || \
|
||||
@@ -96,19 +96,12 @@ function transfer::import() {
|
||||
|
||||
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
|
||||
if [[ ! "$file" =~ ^eidf[a-zA-Z0-9]{2,5}-[a-zA-Z0-9]{3,8}-.+ ]]; then
|
||||
logging::failure "[IMPORT] $file — Filename format invalid"
|
||||
if [[ ! "$file" =~ ^eidf[a-zA-Z0-9]{2,5}-[a-zA-Z0-9]{3,8}-.+$ ]]; then
|
||||
logging::failure "[IMPORT] $file — eidf prefix wrong or missing"
|
||||
continue
|
||||
fi
|
||||
|
||||
|
||||
# example file: eidf123-abc01-file.csv
|
||||
local project="${file%%-*}" # eidf123
|
||||
local rest="${file#*-}" # abc01-file.csv
|
||||
|
||||
Reference in new issue
Block a user