diff --git a/.bin/script b/.bin/script new file mode 100755 index 0000000..6b36d7d --- /dev/null +++ b/.bin/script @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# Script to create script + +if [ -z "$1" ]; then + echo "Script name required" + exit +fi + +path="$HOME/.bin/$1" + +# Prevent overwriting existing script +set -o noclobber + +# Create script +echo "#!/usr/bin/env bash" > "$path" +chmod +x "$path"