Skip to content

Commit

Permalink
[✅] switched all genric structures to the new startup system
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-blazer committed Sep 6, 2023
1 parent 5dfd5c3 commit 6920f34
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
16 changes: 16 additions & 0 deletions genric/go/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ go version
# replacing the values.
PARSED=$(echo "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g' | eval echo "$(cat -)")

# Path to the startup script
startup_script="/home/container/startup.sh"

# Check if the startup script is already downloaded
if [ -f "$startup_script" ]; then
echo "Startup script already exists. Overwriting..."
# Download the updated startup script and set permissions
curl -o "$startup_script" -L https://github.com/tresthost/startup/raw/main/side/client/golang/startup.sh \
&& chmod +x "$startup_script"
else
echo "Startup script does not exist. Creating..."
# Download the startup script and set permissions
curl -o "$startup_script" -L https://github.com/tresthost/startup/raw/main/side/client/golang/startup.sh \
&& chmod +x "$startup_script"
fi

# Display the command we're running in the output, and then execute it with the env
# from the container itself.
printf "\033[1m\033[33mcontainer@tresthost~ \033[0m%s\n" "$PARSED"
Expand Down
16 changes: 16 additions & 0 deletions genric/java/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ java -version
# replacing the values.
PARSED=$(echo "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g' | eval echo "$(cat -)")

# Path to the startup script
startup_script="/home/container/startup.sh"

# Check if the startup script is already downloaded
if [ -f "$startup_script" ]; then
echo "Startup script already exists. Overwriting..."
# Download the updated startup script and set permissions
curl -o "$startup_script" -L https://github.com/tresthost/startup/raw/main/side/client/java/startup.sh \
&& chmod +x "$startup_script"
else
echo "Startup script does not exist. Creating..."
# Download the startup script and set permissions
curl -o "$startup_script" -L https://github.com/tresthost/startup/raw/main/side/client/java/startup.sh \
&& chmod +x "$startup_script"
fi

# Display the command we're running in the output, and then execute it with the env
# from the container itself.
printf "\033[1m\033[33mcontainer@tresthost~ \033[0m%s\n" "$PARSED"
Expand Down
16 changes: 16 additions & 0 deletions genric/python/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ python --version
# replacing the values.
PARSED=$(echo "${STARTUP}" | sed -e 's/{{/${/g' -e 's/}}/}/g')

# Path to the startup script
startup_script="/home/container/startup.sh"

# Check if the startup script is already downloaded
if [ -f "$startup_script" ]; then
echo "Startup script already exists. Overwriting..."
# Download the updated startup script and set permissions
curl -o "$startup_script" -L https://github.com/tresthost/startup/raw/main/side/client/python/startup.sh \
&& chmod +x "$startup_script"
else
echo "Startup script does not exist. Creating..."
# Download the startup script and set permissions
curl -o "$startup_script" -L https://github.com/tresthost/startup/raw/main/side/client/python/startup.sh \
&& chmod +x "$startup_script"
fi

# Display the command we're running in the output, and then execute it with the env
# from the container itself.
printf "\033[1m\033[33mcontainer@tresthost~ \033[0m%s\n" "${PARSED}"
Expand Down

0 comments on commit 6920f34

Please sign in to comment.