stow_dotfiles/scripts/.local/bin/rmscript
2024-11-21 15:20:16 -05:00

11 lines
356 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
# Check if at least one argument is provided
if [ $# -eq 0 ] || [ ! -e "$HOME/.local/bin/$1" ]; then
echo "Error: No script file provided or script does not exist."
echo "Usage: rmscript <SCRIPT_FILE>"
exit 1 # Exit with a non-zero status indicating an error
fi
rm -f "$HOME/.local/bin/$1" && echo "$1 erased."