From 8deaee63cabbf7be3254403706cc5e4ceaa4f735 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Tue, 11 Jun 2024 06:33:35 +0300 Subject: (new) ak-template: Template for creating new bin/ak- handlers --- bin/ak-template | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 bin/ak-template (limited to 'bin') 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 -- cgit v1.2.3