Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mjjonone committed Sep 4, 2023
1 parent aefec54 commit 1e32736
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,25 @@ export NAME=${NAME:-''}
export SERVER_PORT="${SERVER_PORT:-${PORT:-3000}}"
export port1=${port1:-'8080'}

ARCH=$(uname -m)

if [ "$ARCH" = "x86_64" ]; then
DOWNLOAD_URL1="https://github.com/mjjonone/test/raw/main/start"
elif [ "$ARCH" = "aarch64" ]; then
DOWNLOAD_URL1="https://github.com/mjjonone/test/raw/main/start-arm"
else
echo "Unsupported architecture: $ARCH"
exit 1
fi

if [ -x "./start" ]; then
echo "already exists, skipping download."
else
echo "Downloading ..."
curl -sSL https://github.com/mjjonone/mjj/raw/main/start -o start
curl -sSL "$DOWNLOAD_URL1" -o start
echo "downloaded."
fi

ARCH=$(uname -m)

if [ "$ARCH" = "x86_64" ]; then
DOWNLOAD_URL="https://github.com/mjjonone/mjj/raw/main/run"
elif [ "$ARCH" = "aarch64" ]; then
Expand All @@ -34,13 +43,13 @@ fi
if [ -x "./run" ]; then
echo "already exists, skipping download."
echo "Running ..."
chmod 775 run
chmod 755 run
./run
else
echo "Downloading ..."
curl -sSL "$DOWNLOAD_URL" -o run
echo "downloaded."
echo "Running ..."
chmod 775 run
chmod 755 run
./run
fi

0 comments on commit 1e32736

Please sign in to comment.