From cc5af1cccfba03e075c79bcecddfc221bf674803 Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Tue, 5 Nov 2024 08:20:31 -0800 Subject: [PATCH] Update setup-start.sh --- scripts/setup-start.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/setup-start.sh b/scripts/setup-start.sh index 9badd2e..15d1ec5 100644 --- a/scripts/setup-start.sh +++ b/scripts/setup-start.sh @@ -1,6 +1,11 @@ #!/bin/bash # Required User: NB_USER +# Check if a filename argument is provided +if [ -n "$1" ]; then + echo "Warning: Passed-in file '$1' to setup-start.sh is ignored. Looking for a file named 'start' in your repository." >&2 +fi + # Check if running as root and switch to NB_USER if needed if [[ $(id -u) -eq 0 ]]; then echo "Switching to ${NB_USER} to run start.sh" @@ -9,11 +14,6 @@ fi echo "Running setup-start.sh as ${NB_USER}" -# Check if a filename argument is provided -if [ -n "$1" ]; then - echo " Warning: Passed-in file '$1' is ignored. Looking for a file named 'start' in your repository." >&2 -fi - echo " Checking for ${REPO_DIR}/childimage/..." if [ -d "${REPO_DIR}/childimage/" ]; then cd "${REPO_DIR}/childimage/" || exit 1