From 0aae0c4a4be2751fcab26b73308d7b05c7424042 Mon Sep 17 00:00:00 2001 From: "P.Hurley" <21112107+PatHurley@users.noreply.github.com> Date: Sat, 27 Jun 2020 17:09:22 -0400 Subject: [PATCH] missed scriptResources directory in last commit, adding now --- .scriptResources/template.txt | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .scriptResources/template.txt diff --git a/.scriptResources/template.txt b/.scriptResources/template.txt new file mode 100644 index 0000000..6e0755b --- /dev/null +++ b/.scriptResources/template.txt @@ -0,0 +1,51 @@ +#!/bin/bash +# ----------------------------------------------------------------------------- +# Written by: +# +# ----------------------------------------------------------------------------- + +VERSION=0.1.0 +USAGE () { +printf "Usage: $(basename $0) [OPTIONS]... [ARGUMENTS]... + + +OPTIONS. + -h, --help display this help and exit + --version output version information and exit + + + +Exit status: + 0 if OK, + 1 if minor issue (e.g. cannot parse input), + 2 if serious issue (e.g. cannot access file/resource). + + +(i.e. GitHub link, online documentation, etc.)\n" +} + +# --- Options processing ------------------------------------------------------ + +while [[ "$1" =~ ^-.* ]]; do + case $1 in + -h | --help ) shift + USAGE + exit 0 + ;; + --version ) shift + printf "Script Version:\t$VERSION" + exit 0 + ;; + *) + printf "\n [!] Invalid option $1\n\n" + USAGE + exit 1 + ;; + esac; shift +done + +# --- Body -------------------------------------------------------------------- # + +# SCRIPT LOGIC GOES HERE + +exit 0