remaster/script/set_version.sh
6543 d34f7a39bd
mv Changelog
resolve issue #26
2019-09-20 04:47:32 +02:00

28 lines
578 B
Bash
Executable File

#!/bin/bash
version=$1
date=`date +%Y-%m-%d`
[ -e "src/remaster.sh" ] && {
version_sed=`echo $version | sed 's/\./\\./g'`
#nummer
sed -i "/#@version\ /c\#@version\ $version_sed" src/remaster.sh
sed -i "/echo\ Remaster\ /c\ \ \ \ \ \ \ \ \ \ echo\ Remaster\ $version_sed" src/remaster.sh
#datum
sed -i "/#@date\ /c\#@date\ $date" src/remaster.sh
}
[ -e "Changelog.md" ] && {
echo >> Changelog.md
echo $date - $version >> Changelog.md
$EDITOR Changelog.md
}
[ -f "DEBIAN/control" ] && {
sed -i "/Version:\ /c\Version:\ $version_sed" "DEBIAN/control"
}