r67763 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67762‎ | r67763 | r67764 >
Date:21:59, 9 June 2010
Author:platonides
Status:ok
Tags:
Comment:
Follow up r67743.
Mac sed has a parameter "-i <extension>" [http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/sed.1.html]
GNU sed has a parameter "-i<suffix>" [http://www.gnu.org/software/sed/manual/html_node/Invoking-sed.html#Invoking-sed]

These incompatible calls make impossible to use sed -i <expression>, changing sed calls to sed -i -e <expression> form
Modified paths:
  • /trunk/extensions/UsabilityInitiative/Makefile (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/Makefile
@@ -1,6 +1,7 @@
22 #
33 # Handy makefile to combine and minify css and javascript files
44 #
 5+SHELL := /bin/bash
56
67 CSS := \
78 css/suggestions.css\
@@ -57,15 +58,31 @@
5859 Vector/Modules/FooterCleanup/FooterCleanup.js\
5960 Vector/Modules/SimpleSearch/SimpleSearch.js
6061
61 -all: \
 62+USABILITYINITIATIVE_HOOKS := \
6263 css/combined.css\
6364 css/combined.min.css\
 65+ $(CSS)\
6466 js/plugins.combined.js\
6567 js/plugins.combined.min.js\
 68+ $(PLUGINS)
 69+
 70+WIKIEDITOR_HOOKS := \
 71+ $(WIKIEDITOR_MODULES)\
6672 WikiEditor/WikiEditor.combined.js\
67 - WikiEditor/WikiEditor.combined.min.js\
 73+ WikiEditor/WikiEditor.combined.min.js
 74+
 75+VECTOR_HOOKS := \
 76+ $(VECTOR_MODULES)\
6877 Vector/Vector.combined.js\
6978 Vector/Vector.combined.min.js
 79+
 80+all: \
 81+ $(USABILITYINITIATIVE_HOOKS)\
 82+ $(WIKIEDITOR_HOOKS)\
 83+ UsabilityInitiative.hooks.php\
 84+ WikiEditor/WikiEditor.hooks.php\
 85+ Vector/Vector.hooks.php\
 86+
7087
7188 # JavaScript Combination
7289
@@ -108,6 +125,16 @@
109126 jsmin:
110127 type -P jsmin &>/dev/null || ( wget http://www.crockford.com/javascript/jsmin.c; gcc jsmin.c -o jsmin )
111128
 129+# Simple incrementer of versions
 130+
 131+UsabilityInitiative.hooks.php: $(USABILITYINITIATIVE_HOOKS)
 132+WikiEditor/WikiEditor.hooks.php: $(WIKIEDITOR_HOOKS)
 133+Vector/Vector.hooks.php: $(VECTOR_HOOKS)
 134+
 135+%.hooks.php: $(WIKIEDITOR_HOOKS)
 136+ for file in $?; do basefile="$${file#$(shell echo $* | sed "s/\([^\/]*\/\).*/\\1/")}"; sed -i -e "s/\(.*'src' => '$${basefile//\//\\/}', 'version' => \)\([0-9+]*\)\(.*\)/\\1\\2+1\\3/" $@; \
 137+ for i in $$(grep --only-matching -P " ([0-9]+(\+[0-9]))+ " $@); do sed -i -e "s/ $$i / $$(bc <<< $$i) /" $@; done; done
 138+
112139 # Actions
113140
114141 distclean: clean

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r67743Reverted r67722, r67720, r67716, r67715 - (auto version bumping). This is a g...tparscal18:49, 9 June 2010

Status & tagging log