From 8127bf73501c335519dae40101c3b850c4a64e54 Mon Sep 17 00:00:00 2001 From: James Pannacciulli Date: Sun, 11 Jun 2017 11:06:44 -0700 Subject: ariketa first commit ariketa: bash example code quickloader for presentations --- ariketa.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 ariketa.sh (limited to 'ariketa.sh') diff --git a/ariketa.sh b/ariketa.sh new file mode 100644 index 0000000..658588f --- /dev/null +++ b/ariketa.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +_ariketa.dir () { + local _ariketa_filename _ariketa_dir + _ariketa_filename="${BASH_SOURCE[$(( ${#BASH_SOURCE[@]} - 1 ))]}" + [[ "$_ariketa_filename" == */* ]] && _ariketa_dir="${_ariketa_filename%/*}" + + # get an absolute path to ariketa in case we need it + _ariketa_dir=$(cd "${_ariketa_dir:-$PWD}" && printf "%s" "$PWD") + printf "%s" "$_ariketa_dir" +} + + +_ariketa.help () { + >&2 printf "%s\n" "$(