dropshell release 2025.0513.2151
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled
This commit is contained in:
parent
4b4b99634c
commit
1dd4a7958d
40
install.sh
Executable file
40
install.sh
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# download and install dropshell
|
||||
|
||||
# 1. Determine architecture
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
ARCH=$(uname -m)
|
||||
if [[ "$ARCH" == "x86_64" ]]; then
|
||||
BIN=dropshell.amd64
|
||||
elif [[ "$ARCH" == "aarch64" || "$ARCH" == "arm64" ]]; then
|
||||
BIN=dropshell.arm64
|
||||
else
|
||||
echo "Unsupported architecture: $ARCH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# 2. Download the appropriate binary to a temp directory
|
||||
# -----------------------------------------------------------------------------
|
||||
TMPDIR=$(mktemp -d)
|
||||
trap 'rm -rf "$TMPDIR"' EXIT
|
||||
URL="https://gitea.jde.nz/public/dropshell/releases/download/latest/$BIN"
|
||||
echo "Downloading $BIN from $URL..."
|
||||
|
||||
curl -fsSL -o "$TMPDIR/dropshell" "$URL"
|
||||
|
||||
if [ ! -f "$TMPDIR/dropshell" ]; then
|
||||
echo "Failed to download dropshell" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
chmod +x "$TMPDIR/dropshell"
|
||||
|
||||
docker run --rm -v "$TMPDIR:/tmp" -v /usr/local/bin:/target alpine sh -c "cp /tmp/dropshell /target/dropshell && ln -s /target/dropshell /target/ds"
|
||||
rm "$TMPDIR/dropshell"
|
||||
|
||||
echo "dropshell installed successfully to /usr/local/bin/dropshell"
|
||||
|
Loading…
x
Reference in New Issue
Block a user