No longer look in default locations (to not mix versions) and variable
directories (".", "..") to not inject foreign/malicious code, but try to
get the correct path name from the path of the sd-tool script.
# (at your option) any later version.
#
+BIN_D=$(dirname "$0")
+
# Detect our "share" folder ...
unset SHARE_D
-for d in . .. /usr/local /usr; do
+for d in "${BIN_D}" "${BIN_D}"/..; do
for s in share share/sd-tool; do
if [[ -r "${d}/${s}/sd-tool-common.inc.sh" ]]; then
SHARE_D="${d}/${s}"