I'm working on an uninstaller script to delete the parent folder where the script is installed.
rm- rf /usr/local/Myapplication
SYMLINKS=$(readlink -f "$0")
How about using
APP_ROOT="$(dirname "$(dirname "$(readlink "$0")")")"
The quoting desaster is only necessary to guard against whitespace in paths. Otherwise it would be more pleasing to the eye:
APP_ROOT=$(dirname $(dirname $(readlink $0)))