AHHHHHHHHHHHH very simple solution

This commit is contained in:
Nicholas 2021-10-28 18:55:57 -07:00
parent f72b9a5699
commit d3b28199e9
1 changed files with 1 additions and 10 deletions

View File

@ -3,18 +3,9 @@
# Find the name of the folder the scripts are in # Find the name of the folder the scripts are in
# X! Still erroring out, doesnt get the directory no matter what. # X! Still erroring out, doesnt get the directory no matter what.
# Found potential Solution
# I hate it # I hate it
cd / export SCRIPTHOME="$(basename -- $PWD)"
if [ -L $0 ] ; then
ME=$(readlink $0)
else
ME=$0
fi
dir=$(dirname $ME)
export SCRIPTHOME="$(basename -- $dir)"
echo "Scripts are in dir named $SCRIPTHOME" echo "Scripts are in dir named $SCRIPTHOME"
cd $PWD cd $PWD