Compare commits
4 Commits
2025.0513.
...
2025.0513.
Author | SHA1 | Date | |
---|---|---|---|
8d5296d9ea | |||
524d3df1b2 | |||
54dce4862f | |||
1dd4a7958d |
@ -1,3 +1,9 @@
|
||||
# Dropshell
|
||||
|
||||
A system management tool for server operations, written in C++.
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
curl -fsSL https://gitea.jde.nz/public/dropshell/releases/download/latest/install.sh | bash
|
||||
```
|
47
install.sh
Executable file
47
install.sh
Executable file
@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# download and install dropshell
|
||||
|
||||
# Check if running as root
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
print_error "Please run this script as root (use sudo)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 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"
|
||||
|
||||
cp "$TMPDIR/dropshell" /usr/local/bin/dropshell
|
||||
ln -s /usr/local/bin/dropshell /usr/local/bin/ds
|
||||
rm -rf "$TMPDIR"
|
||||
|
||||
echo "dropshell installed successfully to /usr/local/bin/dropshell"
|
||||
|
Reference in New Issue
Block a user