diff options
| author | srdusr <trevorgray@srdusr.com> | 2025-09-24 05:25:39 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2025-09-24 05:25:39 +0200 |
| commit | a1627ac743289e768b138f1a60753a62e0869cc4 (patch) | |
| tree | 92ab373442943f621bb26b3b284bb1da90e2923a /unix/utils/xtouch | |
| parent | fdb0eb921205c34fb6ff5728727a097767ffae5a (diff) | |
| download | dotfiles-a1627ac743289e768b138f1a60753a62e0869cc4.tar.gz dotfiles-a1627ac743289e768b138f1a60753a62e0869cc4.zip | |
Update/Overhaul
Diffstat (limited to 'unix/utils/xtouch')
| -rwxr-xr-x | unix/utils/xtouch | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/unix/utils/xtouch b/unix/utils/xtouch deleted file mode 100755 index a5eb23b..0000000 --- a/unix/utils/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 |
