srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/xtouch
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2025-09-24 05:01:20 +0200
committersrdusr <[email protected]>2025-09-24 05:01:20 +0200
commit553cb2204b0bf27afe13c6332f5679bbd47172a0 (patch)
tree75c86ff018122a682e0afd7a0e2a0228a63e44bd /xtouch
parentb20e4e004be74884cc72c57a3128e36fd5177d7a (diff)
downloadscripts-553cb2204b0bf27afe13c6332f5679bbd47172a0.tar.gz
scripts-553cb2204b0bf27afe13c6332f5679bbd47172a0.zip
Update/Overhaul
Diffstat (limited to 'xtouch')
-rwxr-xr-xxtouch38
1 files changed, 0 insertions, 38 deletions
diff --git a/xtouch b/xtouch
deleted file mode 100755
index a5eb23b..0000000
--- a/xtouch
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env bash
-
-check_valid() {
- if [ -f "$1" ]; then
- echo "The file "$1" already exists!"
- exit 1
- fi
-}
-
-create_script() {
- touch "$1"
- chmod +x "$1"
- echo "$0: $2 script file $1 created with exec permissions"
- echo -e '#!/usr/bin/env '"$2" > "$1"
-}
-
-usage() {
- echo -e "Quickly create executable script\n"
- echo "Usage:"
- echo " xtouch [ -w FILE LANG ]"
- echo -e " xtouch ( -h | --help )\n"
- echo "Arguments:"
- echo "FILE Name to give the scripts"
- echo -e "LANG Language in which the script will be written\n"
- echo "Options:"
- echo " -w FILE LANG Creates a <LANG> executable script file named <FILE>."
- echo " -h --help Show this screen."
-}
-
-case "$1" in
- '-w')
- check_valid "$2"
- create_script "$2" "$3"
- ;;
- *)
- usage
- ;;
-esac