mirror of
https://github.com/casjaysdevdocker/bun
synced 2025-12-01 10:14:19 -05:00
🗃️ Updated Dockerfile* and .env.scripts* 🗃️
Dockerfile Dockerfile.1.0 Dockerfile.1.1 .env.scripts .env.scripts.1.0 .env.scripts.1.1 .gitea/workflows/docker-1_0.yaml .gitea/workflows/docker-1_1.yaml .gitea/workflows/docker.1.yaml .gitea/workflows/docker.yaml rootfs/root/docker/setup/05-custom.sh rootfs/usr/local/bin/entrypoint.sh rootfs/usr/local/etc/docker/functions/entrypoint.sh
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
##@Version : 202509161144-git
|
||||
##@Version : 202511291200-git
|
||||
# @@Author : CasjaysDev
|
||||
# @@Contact : CasjaysDev <docker-admin@casjaysdev.pro>
|
||||
# @@License : MIT
|
||||
@@ -8,7 +8,7 @@
|
||||
# @@Copyright : Copyright 2023 CasjaysDev
|
||||
# @@Created : Mon Aug 28 06:48:42 PM EDT 2023
|
||||
# @@File : 05-custom.sh
|
||||
# @@Description : script to run custom
|
||||
# @@Description : script to install Bun
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# shellcheck shell=bash
|
||||
# shellcheck disable=SC2016
|
||||
@@ -24,15 +24,35 @@ set -o pipefail
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set env variables
|
||||
exitCode=0
|
||||
LANG_VERSION="${LANG_VERSION:-latest}"
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Predefined actions
|
||||
echo "Installing Bun version: ${LANG_VERSION}"
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Main script
|
||||
# Install Bun
|
||||
if [ "$LANG_VERSION" = "latest" ]; then
|
||||
echo "Installing latest Bun..."
|
||||
curl -fsSL https://bun.sh/install | bash || exitCode=1
|
||||
else
|
||||
echo "Installing Bun v${LANG_VERSION}..."
|
||||
curl -fsSL https://bun.sh/install | bash -s "bun-v${LANG_VERSION}" || exitCode=1
|
||||
fi
|
||||
|
||||
# Move to /usr/local/bin
|
||||
if [ -f "$HOME/.bun/bin/bun" ]; then
|
||||
mv "$HOME/.bun/bin/bun" /usr/local/bin/bun || exitCode=1
|
||||
mv "$HOME/.bun/bin/bunx" /usr/local/bin/bunx || exitCode=1
|
||||
rm -rf "$HOME/.bun"
|
||||
echo "Bun installed successfully"
|
||||
bun --version || exitCode=1
|
||||
else
|
||||
echo "Bun installation failed" >&2
|
||||
exitCode=1
|
||||
fi
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set the exit code
|
||||
#exitCode=$?
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
exit $exitCode
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# ex: ts=2 sw=2 et filetype=sh
|
||||
|
||||
Reference in New Issue
Block a user