Skip to content

Commit

Permalink
Update setup-start.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
eeholmes authored Nov 5, 2024
1 parent e5d90ee commit cc5af1c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/setup-start.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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
Expand Down

0 comments on commit cc5af1c

Please sign in to comment.