while[ -h "$SOURCE"];do# resolve $SOURCE until the file is no longer a symlink
DIR="$(cd -P "$( dirname "$SOURCE")"&&pwd)"
SOURCE="$(readlink "$SOURCE")"
[[${SOURCE} != /* ]]&&SOURCE="$DIR/$SOURCE"# if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
. $(dirname ${SOURCE})/init.sh
PS1="$"
echo"Rebuilding patch files from current fork state..."
echo"$(bashColor 1 31)[[[ WARNING ]]] $(bashColor 1 33)- Not saving Tuinity-Server as it appears ${FORK_NAME}-API did not apply clean.$(bashColorReset)"
echo"$(bashColor 1 33)If this is a mistake, delete $(bashColor 1 34)${FORK_NAME}-API/.git/patch-apply-failed$(bashColor 1 33) and run rebuild again.$(bashColorReset)"