Skip to content

Commit e7091ed

Browse files
authored
fix bad conflict resolution (#366)
Update script (linux fix) Signed-off-by: kuba-- <[email protected]>
1 parent 255031e commit e7091ed

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

rev-upgrade.sh

+8-3
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,18 @@ echo "Project: $PRJ"
5454
echo "Old rev: $REV_OLD"
5555
echo "New rev: $REV_NEW"
5656

57-
if [ $REV_OLD == $REV_NEW ]; then
57+
if [ "$REV_OLD" == "$REV_NEW" ]; then
5858
exit 0
5959
fi
6060

61-
for file in $(git ls-files | xargs egrep -l $REV_OLD); do
61+
for file in $(git ls-files | xargs egrep -l "$REV_OLD"); do
6262
echo "# $file"
63-
sed -i '' "s/$REV_OLD/$REV_NEW/g" $file
63+
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+
6469
done
6570

6671
err=$?

0 commit comments

Comments
 (0)