23 lines
799 B
Bash
Executable File
23 lines
799 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# download and install dropshell
|
|
|
|
# 1. Determine architecture
|
|
# -----------------------------------------------------------------------------
|
|
|
|
ARCH=$(uname -m)
|
|
|
|
TARGET_PATH="${HOME}/.local/bin/dropshell"
|
|
[ ! -f "${TARGET_PATH}" ] || rm -f "${TARGET_PATH}"
|
|
mkdir -p "$(dirname "${TARGET_PATH}")"
|
|
curl -L -s -o "${TARGET_PATH}" "https://getbin.xyz/dropshell.${ARCH}" || die "Failed to download dropshell for ${ARCH}"
|
|
chmod +x "${TARGET_PATH}"
|
|
echo "dropshell installed successfully to $TARGET_PATH"
|
|
echo " "
|
|
|
|
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."
|