made the dir name a variable
authorFred T. Hamster <fred@gruntose.com>
Tue, 12 Nov 2024 21:28:52 +0000 (16:28 -0500)
committerFred T. Hamster <fred@gruntose.com>
Tue, 12 Nov 2024 21:28:52 +0000 (16:28 -0500)
a slight concession to reusability

scripts/customize/fred/scripts/jobby/archie_grabber.sh

index 5e3c5ab61789a1b8f8db4864d1bb8f1b9daca875..f58b54a17462bfc82fef6278b6bf397e37079768 100644 (file)
@@ -5,6 +5,9 @@
 
 source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
 
+# the archive directories will be known by their odd naming, which starts with the below.
+ARCHIVE_DIR_PREFIX="z_arch"
+
 function grab_archies()
 {
   local domain_piece="$1"; shift
@@ -12,10 +15,10 @@ function grab_archies()
   for host in $host_list; do
     mkdir -p ${host}.${domain_piece}
     pushd ${host}.${domain_piece}
-    netcp ${host}.${domain_piece}:z_arch* . 
+    netcp ${host}.${domain_piece}:${ARCHIVE_DIR_PREFIX}* . 
     retval=$?
     if [ $retval -ne 0 ]; then
-      echo "Error $retval returned from copying z_arch* from ${host}.${domain_piece}"
+      echo "Error $retval returned from copying ${ARCHIVE_DIR_PREFIX}* from ${host}.${domain_piece}"
       popd 
       continue
     fi