Ticket #1422: nongnused_version_sh.patch

File nongnused_version_sh.patch, 464 bytes (added by iNode, 7 years ago)

more portable solution instead of sed -r

  • maint/version.sh

    diff --git a/maint/version.sh b/maint/version.sh
    index 82c2075..e49e343 100755
    a b CURR_MC_VERSION="${PREV_MC_VERSION}" 
    1414 
    1515if [ -r ${VERSION_FILE} ] 
    1616  then 
    17     PREV_MC_VERSION=`sed -rn 's/^#define MC_CURRENT_VERSION "(.*)"$/\1/p' "${VERSION_FILE}"` 
     17    PREV_MC_VERSION=`perl -ne 'print if (s/^#define MC_CURRENT_VERSION "(.*)"$/$1/)' "${VERSION_FILE}"` 
    1818    CURR_MC_VERSION="${PREV_MC_VERSION}" 
    1919fi 
    2020