Compare commits

..
3 Commits
Author SHA1 Message Date
abrown38 c4a36c0cd4 remove duplicate code and update error message 2026-08-13 10:08:02 +01:00
abrown38 0487eb1c0c lowercase directory names to match old serv-u 2026-04-21 15:20:15 +01:00
abrown38 1464774831 replace symlinks 2026-04-16 11:30:21 +01:00
3 changed files with 19 additions and 13 deletions

No files matched your search

-1
View File
@@ -1 +0,0 @@
/root/scripts/space-domains.txt
+4
View File
@@ -0,0 +1,4 @@
eidfsp02-sgstd
eidfsp04-sgpro
eidfsp03-sgprodev
eidfsp01-sgstddev
-1
View File
@@ -1 +0,0 @@
/root/scripts/space-project-map
+11
View File
@@ -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
View File
@@ -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