[ https://issues.apache.org/jira/browse/KARAF-4371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15175177#comment-15175177 ]
ASF GitHub Bot commented on KARAF-4371: --------------------------------------- Github user asfgit closed the pull request at: https://github.com/apache/karaf/pull/159 > 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 > Assignee: Freeman Fang > 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)