We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 255031e commit e7091edCopy full SHA for e7091ed
rev-upgrade.sh
@@ -54,13 +54,18 @@ echo "Project: $PRJ"
54
echo "Old rev: $REV_OLD"
55
echo "New rev: $REV_NEW"
56
57
-if [ $REV_OLD == $REV_NEW ]; then
+if [ "$REV_OLD" == "$REV_NEW" ]; then
58
exit 0
59
fi
60
61
-for file in $(git ls-files | xargs egrep -l $REV_OLD); do
+for file in $(git ls-files | xargs egrep -l "$REV_OLD"); do
62
echo "# $file"
63
- sed -i '' "s/$REV_OLD/$REV_NEW/g" $file
+ if [[ $OSTYPE == darwin* ]]; then
64
+ sed -i '' "s/$REV_OLD/$REV_NEW/g" "$file"
65
+ else
66
+ sed -i'' "s/$REV_OLD/$REV_NEW/g" "$file"
67
+ fi
68
+
69
done
70
71
err=$?
0 commit comments