Luca Burgazzoli created KARAF-4371: -------------------------------------- Summary: karaf shell scripts use "local" which is not a posix compliant Key: KARAF-4371 URL: https://issues.apache.org/jira/browse/KARAF-4371 Project: Karaf Issue Type: Bug Components: karaf-os-integration Reporter: Luca Burgazzoli Priority: Minor
karaf shell scripts use "local" in function pathCanonical which is not posix compliant: {code} 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' } {code} As a consequence the script fails on non-bash shells: {code} 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] {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)