diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-06-11 06:33:35 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-06-11 06:33:35 +0300 |
commit | 8deaee63cabbf7be3254403706cc5e4ceaa4f735 (patch) | |
tree | e2b813c89648c15f45014c0705dab1a0535f2747 | |
parent | 5654e0097de3df6bb8fde1541e2871a9ac81fcbc (diff) | |
download | arching-kaos-tools-8deaee63cabbf7be3254403706cc5e4ceaa4f735.tar.gz arching-kaos-tools-8deaee63cabbf7be3254403706cc5e4ceaa4f735.tar.bz2 arching-kaos-tools-8deaee63cabbf7be3254403706cc5e4ceaa4f735.zip |
(new) ak-template: Template for creating new bin/ak- handlers
-rwxr-xr-x | bin/ak-template | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/bin/ak-template b/bin/ak-template new file mode 100755 index 0000000..151d9d7 --- /dev/null +++ b/bin/ak-template @@ -0,0 +1,30 @@ +#!/bin/bash +## +## Brief description +## +## Usage: +## +## -h, --help Prints this help message +## +fullprogrampath="$(realpath $0)" +PROGRAM=$(basename $0) +descriptionString="Quick description" + +# At least these +source $AK_LIBDIR/_ak_log +source $AK_LIBDIR/_ak_script + +# Your stuff here... +example(){ + echo "Example" +} + +# Flags to run +if [ ! -z $1 ]; then + case $1 in + -h | --help) _ak_usage; exit;; + --example) example; exit;; + * ) _ak_usage;; + esac +else _ak_usage +fi |