ds
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 12s

This commit is contained in:
Your Name
2025-05-25 18:14:15 +12:00
parent f45d9a33ed
commit d71ba38754
10 changed files with 10878 additions and 149 deletions

View File

@ -3,12 +3,6 @@ set -e
# download and install dropshell
# Check if running as root
if [ "$EUID" -ne 0 ]; then
echo "Please run this script as root (use sudo)"
exit 1
fi
# 1. Determine architecture
# -----------------------------------------------------------------------------
@ -30,21 +24,26 @@ 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"
TARGET_PATH="${HOME}/.local/bin/dropshell"
if [ ! -f "$TMPDIR/dropshell" ]; then
mkdir -p "${HOME}/.local/bin"
curl -fsSL -o "$TARGET_PATH" "$URL"
if [ ! -f "$TARGET_PATH" ]; then
echo "Failed to download dropshell" >&2
exit 1
fi
chmod +x "$TMPDIR/dropshell"
chmod +x "$TARGET_PATH"
cp "$TMPDIR/dropshell" /usr/local/bin/dropshell
if [ -f /usr/local/bin/ds ]; then
rm -f /usr/local/bin/ds
if [ ! -f "${HOME}/.local/bin/ds" ]; then
ln -s "$TARGET_PATH" "${HOME}/.local/bin/ds"
fi
ln -s /usr/local/bin/dropshell /usr/local/bin/ds
rm -rf "$TMPDIR"
echo "dropshell installed successfully to /usr/local/bin/dropshell"
echo "dropshell installed successfully to $TARGET_PATH"
echo "Please:"
echo "1. run '${TARGET_PATH} edit' to edit the configuration."
echo "2. run '${TARGET_PATH} install' to install dropshell components on this computer."
echo "3. run 'source ~/.bashrc' to add to your path and autocomplete for the current shell."