From: znek Date: Wed, 21 Feb 2007 07:27:14 +0000 (+0000) Subject: improved the script, prevent an error from happening X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e753033d942dc341f0ea6b9832b3873d004398b9;p=sope improved the script, prevent an error from happening git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1435 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/maintenance/ChangeLog b/maintenance/ChangeLog index c0ef835d..af2adca0 100644 --- a/maintenance/ChangeLog +++ b/maintenance/ChangeLog @@ -1,3 +1,9 @@ +2007-02-21 Marcus Mueller + + * syncXcodeVersions.sh: fixed substitution bug in case of + SUBMINOR_VERSION overflow (>255) - also check if resulting plist + is syntactically correct, abort on error + 2005-10-09 Helge Hess * make-osxmpkg.sh, make-osxpkg.sh: improved versioning support diff --git a/maintenance/syncXcodeVersions.sh b/maintenance/syncXcodeVersions.sh index d40f63be..de2b2678 100755 --- a/maintenance/syncXcodeVersions.sh +++ b/maintenance/syncXcodeVersions.sh @@ -15,7 +15,13 @@ set_dylib_version() { # magic happens here sed "s/\(^[ ]*DYLIB_CURRENT_VERSION =[ ]*\)\(.*\)\(;.*$\)/\1${DYLIB_VERSION}\3/" "${PROJECT}" > "${PROJECT}.new" - mv ${PROJECT}.new ${PROJECT} + OK=`/usr/bin/plutil -lint ${PROJECT}.new | grep OK` + if [ "${OK}" != "" ]; then + mv ${PROJECT}.new ${PROJECT} + else + echo "ERROR: couldn't set version ($2) on $1!" + exit 6 + fi } set_sope_versions() { @@ -84,7 +90,7 @@ read_version_from_version_file() { MINOR_VERSION=${_MINOR_VERSION} fi # this is always set - SUBMINOR_VERSION=`sed -n 's/^SUBMINOR_VERSION.*=\(.*\)/\1/p' "${VERS_FILE}"` + SUBMINOR_VERSION=`sed -n 's/^SUBMINOR_VERSION.*=\(.*\)/\1/p' "${VERS_FILE}"|tail -1l` # echo "${VERS_FILE} -> ${MAJOR_VERSION}.${MINOR_VERSION}.${SUBMINOR_VERSION}" }