scripts: fix remove-version-match.sh
This commit is contained in:
parent
7ef61b0bc9
commit
78f0cdbf0d
@ -3,4 +3,6 @@ if [ -z $1 ]; then
|
|||||||
echo "Must specify a file to modify..."
|
echo "Must specify a file to modify..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
perl -pe 's;^=?(\S+)(?:-[[:digit:]]+\.\S+)(\s)(\S+)$;\1\2\3;' -i "${1}"
|
regex='^=?(\S+)(?:-[[:digit:]]+\S*)(\s)(\S+)$'
|
||||||
|
sub='\1\2\3'
|
||||||
|
perl -pe "s;$regex;$sub;gm" -i "${1}"
|
||||||
|
Loading…
Reference in New Issue
Block a user