my-scripts/install-script

14 lines
199 B
Plaintext
Raw Normal View History

2024-12-31 10:03:56 +00:00
#!/bin/bash
set -euo pipefail
SCRIPT_FILE="$1"
# Remove extension from script
if [[ $SCRIPT_FILE == *.* ]]
then
SCRIPT_FILE=${SCRIPT_FILE%.*}
fi
install -m 755 "$SCRIPT_FILE" "$HOME/.local/bin"