X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=scripts%2Fexamples%2Fscript_location.sh;fp=scripts%2Fexamples%2Fscript_location.sh;h=bdae0fc7735ac04acc2114716d88a1ed5bdc4451;hb=31795d379b8a94e37465677f5776c47a476a0f64;hp=0000000000000000000000000000000000000000;hpb=12271e032cc820565839dc4029666edac84de8ba;p=feisty_meow.git diff --git a/scripts/examples/script_location.sh b/scripts/examples/script_location.sh new file mode 100644 index 00000000..bdae0fc7 --- /dev/null +++ b/scripts/examples/script_location.sh @@ -0,0 +1,7 @@ + +# find out the location where this script is running from. this will not +# work properly in a bash script that is included via 'source' or '.'. +# the first letter of each command is escaped to eliminate the danger of +# personal aliases or functions disrupting the results. +ORIGINATING_FOLDER="$( \cd "$(\dirname "$0")" && \pwd )" +