http://74f5ydnjsrizxzjux3ivt5qt2epgzvq2pfipttdpjblyqcx7i4sq.b32.i2p/chat98/chat98/commit/358aa6038cb79ae451a8d6d1fae44ba32ac77741.diff
.
+#
+##############################################################################
+
+# Attempt to set APP_HOME
+
+# Resolve links: $0 may be a link
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
+ [ -h "$app_path" ]
+do
+ ls=$( ls -ld "$app_path" )
+ link=${ls#*' -> '}
+ case $link in #(
+ /*) app_path=$link ;; #(
+ *) ...