#!/bin/sh if [ $# -ne 2 ]; then echo Run this in the kde expressions directory echo usage: $0 oldversion newversion echo example: $0 4.3.4 4.3.5 echo echo This will not update the l10n expressions, which have their own generator. echo This code supposes that the sha* assignations happen in the immediately next echo line to the url assignation. exit 1 fi OLD=$1 NEW=$2 # Regexp to match for the old version regexp_old="$(echo $OLD | sed -e 's/\./\\./g')" # stdin: the result of grep -1 "\" $A > tmp; < tmp updateinfile $A fi done } # Apply the version update to all nix files but l10n from '.' find . -\( -name *.nix -and -not -path "*l10n*" -\) | updatefiles