Skip to content

Commit

Permalink
Adding bash script for versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
lcsrodriguez committed Dec 25, 2023
1 parent 9f5983a commit 232868f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions chver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
if [ "$#" -ne 2 ]; then
echo "Illegal number of parameters"
exit 1
fi
OLD_VER=$1
NEW_VER=$2
echo ${OLD_VER} "->" ${NEW_VER}
echo "----------- Files -----------"
grep -rl --exclude-dir=.git --exclude-dir=venv -I $1 . # Excluding binaries
grep -rl --exclude-dir=.git --exclude-dir=venv -I $1 . | xargs sed -i "" -e "s/${OLD_VER}/${NEW_VER}/g"

0 comments on commit 232868f

Please sign in to comment.