JAL-3631 Some small but important changes to run_other_script.ps1
authorBen Soares <b.soares@dundee.ac.uk>
Tue, 6 Aug 2024 11:05:37 +0000 (12:05 +0100)
committerBen Soares <b.soares@dundee.ac.uk>
Tue, 6 Aug 2024 11:05:37 +0000 (12:05 +0100)
utils/getdown/bin/run_other_script.ps1

index 80f2a87..1c00beb 100755 (executable)
@@ -39,5 +39,11 @@ $SCRIPTPATH = Readlink-f -Link $CMDPATH
 $SCRIPTBIN = Split-Path -Path $SCRIPTPATH -Parent
 $SCRIPT = Join-Path $SCRIPTBIN -ChildPath $OTHERSCRIPT
 
-Write-Host "Running: $SCRIPT $args"
-& $SCRIPT $args
+if ( $args.Count -eq 0 ) {
+  & $SCRIPT
+} else {
+  if ($args.Contains("--debug")) {
+    Write-Host "Running: $SCRIPT $args"
+  }
+  & $SCRIPT @args
+}