harbour-batterybuddy/update-spec-version.sh
2020-03-23 04:12:05 +02:00

13 lines
299 B
Bash
Executable file

#!/bin/bash
SPEC=rpm/$1.spec
if [[ $(grep "^Version: $2$" $SPEC | wc -l) = 0 ]]
then
sed -i "/^Version: /c\Version: $2" $SPEC
touch src/$1.cpp
fi
if [[ $(grep "^Release: $3$" $SPEC | wc -l) = 0 ]]
then
sed -i "/^Release: /c\Release: $3" $SPEC
touch src/$1.cpp
fi
echo true