aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/_ak_newline5
-rwxr-xr-xlib/_ak_script_description16
-rwxr-xr-xlib/_ak_script_exit17
3 files changed, 38 insertions, 0 deletions
diff --git a/lib/_ak_newline b/lib/_ak_newline
new file mode 100755
index 0000000..955ee6c
--- /dev/null
+++ b/lib/_ak_newline
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+new_line(){
+ printf '\n'
+}
diff --git a/lib/_ak_script_description b/lib/_ak_script_description
new file mode 100755
index 0000000..740b1c4
--- /dev/null
+++ b/lib/_ak_script_description
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+source $AK_LIBDIR/_ak_newline
+
+description(){
+ full_title="$(printf '%s - %s' "$PROGRAM" "$descriptionString")"
+ delimiter_count=`echo -n $full_title | wc -c`
+ printf '%s' "$full_title"
+ new_line
+ while [ $delimiter_count -gt 0 ]
+ do
+ printf '='
+ delimiter_count=$(($delimiter_count-1))
+ done
+ new_line
+}
diff --git a/lib/_ak_script_exit b/lib/_ak_script_exit
new file mode 100755
index 0000000..81fe2c8
--- /dev/null
+++ b/lib/_ak_script_exit
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+exit_program(){
+# cd $curdir
+# if [ "$3" == "save_log" ]
+# then
+# tar cvfz $curdir/$(basename $tempdir)-$launch_timestamp.tgz $tempdir
+# fi
+# rm -rf $tempdir
+ if [ $1 -ne 0 ]
+ then
+ logit "EXIT" "$2 ($1)"
+ else
+ logit "EXIT" "$2"
+ fi
+ exit $1
+}