converting bash script to zsh
I want to translate this bash-script intro a zsh-script. Hence I have no
experience with this I hope I may get help here:
bash script:
SCRIPT_PATH="${BASH_SOURCE[0]}";
if([ -h "${SCRIPT_PATH}" ]) then
while([ -h "${SCRIPT_PATH}" ]) do SCRIPT_PATH=`readlink
"${SCRIPT_PATH}"`; done
fi
pushd . > /dev/null
cd `dirname ${SCRIPT_PATH}` > /dev/null
SCRIPT_PATH=`pwd`;
popd > /dev/null
What I already know is that I can use SCRIPT_PATH="$0"; to get the path
were the script is located at. But then I get errors with the "readlink"
statement.
Thanks for your help
No comments:
Post a Comment