r67961 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67960‎ | r67961 | r67962 >
Date:20:58, 13 June 2010
Author:platonides
Status:ok
Tags:
Comment:
Remove bc dependency using the shell Arithmetic expansion, per Roan CR in r67867
Modified paths:
  • /trunk/extensions/UsabilityInitiative/Makefile (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/Makefile
@@ -140,7 +140,7 @@
141141 # For each group of summing numbers inside the target file, use bc to calculate the sum and replace with sed.
142142 %.hooks.php: $(WIKIEDITOR_HOOKS)
143143 for file in $?; do basefile="$${file#$(shell echo $* | sed "s/\([^\/]*\/\).*/\\1/")}"; sed -i -e "s/\(.*'src' => '$${basefile//\//\\/}', 'version' => \)\([0-9+]*\)\(.*\)/\\1\\2+1\\3/" $@; \
144 - for i in $$(grep --only-matching -P " ([0-9]+(\+[0-9]))+ " $@); do sed -i -e "s/ $$i / $$(bc <<< $$i) /" $@; done; done
 144+ for i in $$(grep --only-matching -P " ([0-9]+(\+[0-9]))+ " $@); do sed -i -e "s/ $$i / $$(($$i)) /" $@; done; done
145145
146146 # Actions
147147

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r67867Document what does this bunch of make, regex and sed code.platonides21:10, 11 June 2010

Status & tagging log