From: Thomas Berezansky Date: Thu, 30 Aug 2012 13:03:00 +0000 (-0400) Subject: Add "bump-xul" target for staff client Makefile X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Ftsbere%2Fxulrunner_15;p=working%2FEvergreen.git Add "bump-xul" target for staff client Makefile It looks for the latest non-beta non-release xulrunner version and updates version numbers across: Makefile.am (and updates Makefile.in and Makefile while at it) application.ini install.rdf Intent is to be much easier than editing the files by hand. Signed-off-by: Thomas Berezansky --- diff --git a/Open-ILS/xul/staff_client/Makefile.am b/Open-ILS/xul/staff_client/Makefile.am index de789fdbea..55defedff3 100644 --- a/Open-ILS/xul/staff_client/Makefile.am +++ b/Open-ILS/xul/staff_client/Makefile.am @@ -15,7 +15,8 @@ XULRUNNER_VERSION=15.0 XULRUNNER_WINFILE=xulrunner-$(XULRUNNER_VERSION).en-US.win32.zip XULRUNNER_LINUX32FILE=xulrunner-$(XULRUNNER_VERSION).en-US.linux-i686.tar.bz2 XULRUNNER_LINUX64FILE=xulrunner-$(XULRUNNER_VERSION).en-US.linux-x86_64.tar.bz2 -XULRUNNER_URL=ftp://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$(XULRUNNER_VERSION)/runtimes/ +XULRUNNER_BASE_URL=ftp://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/ +XULRUNNER_URL=${XULRUNNER_BASE_URL}$(XULRUNNER_VERSION)/runtimes/ XULRUNNER_MAJOR_VERSION=$$(echo ${XULRUNNER_VERSION} | cut -d. -f1) # Extensions we include when not an extension ourselves @@ -386,3 +387,17 @@ updates updates-client win-updates win-updates-client linux32-updates linux32-up @if [ ! -x external/make_updates.sh ]; then chmod u+x external/make_updates.sh; fi @if [ ! -x external/make_updates.sh ]; then echo 'ERROR! external/make_updates.sh is not executable!'; exit 1; fi @external/make_updates.sh ${UPDATESDIR} $@ + +# Bumping xul version numbers +bump-xul: + @wget --default-page=.xulrunner_list.html ${XULRUNNER_BASE_URL} + @grep -o '[^<]*/' .xulrunner_list.html | sed 's/^\(.*\)\/<\/a>/\1/' | grep -iv '[a-z]' | sort -rV > .xulrunner_list.versions + @head -n 1 .xulrunner_list.versions > .xulrunner_list.latest + @cat .xulrunner_list.latest | sed 's/^\([0-9]*\)\..*/\1.*/' > .xulrunner_list.wildcarded + @sed -i "s/^MaxVersion=.*/MaxVersion=`cat .xulrunner_list.wildcarded`/" application.ini + @sed -i "s|.*|`cat .xulrunner_list.wildcarded`|" install.rdf + @sed -i "s/^\(XULRUNNER_VERSION \?= \?\)[0-9].*/\1`cat .xulrunner_list.latest`/" Makefile Makefile.* + @rm .xulrunner_list.html + @rm .xulrunner_list.versions + @rm .xulrunner_list.latest + @rm .xulrunner_list.wildcarded