my-scripts/install-script

14 lines
199 B
Bash
Executable File

#!/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"