Details
Description
karaf shell scripts use "local" in function pathCanonical which is not posix compliant:
pathCanonical() {
local dst="${1}"
while [ -h "${dst}" ] ; do
ls=`ls -ld "${dst}"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
dst="$link"
else
dst="`dirname "${dst}"`/$link"
fi
done
local bas=`basename "${dst}"`
local dir=`dirname "${dst}"`
if [ "$bas" != "$dir" ]; then
dst="`pathCanonical "$dir"`/$bas"
fi
echo "${dst}" | sed -e 's#//#/#g' -e 's#/./#/#g' -e 's#/[^/]*/../#/#g'
}
As a consequence the script fails on non-bash shells:
bin/karaf[169]: local: not found [No such file or directory] bin/karaf[179]: local: not found [No such file or directory] bin/karaf[180]: local: not found [No such file or directory]