remaster/script/set_version.sh

28 lines
578 B
Bash
Raw Normal View History

2018-05-10 12:19:14 +00:00
#!/bin/bash
2018-05-10 20:47:24 +00:00
version=$1
date=`date +%Y-%m-%d`
2018-05-10 12:19:14 +00:00
2018-05-10 20:47:24 +00:00
[ -e "src/remaster.sh" ] && {
version_sed=`echo $version | sed 's/\./\\./g'`
2018-05-10 12:19:14 +00:00
#nummer
2018-05-20 18:32:55 +00:00
sed -i "/#@version\ /c\#@version\ $version_sed" src/remaster.sh
sed -i "/echo\ Remaster\ /c\ \ \ \ \ \ \ \ \ \ echo\ Remaster\ $version_sed" src/remaster.sh
2018-05-10 12:19:14 +00:00
#datum
2018-05-20 18:32:55 +00:00
sed -i "/#@date\ /c\#@date\ $date" src/remaster.sh
2018-05-10 20:47:24 +00:00
}
2019-09-20 02:47:32 +00:00
[ -e "Changelog.md" ] && {
2018-05-10 20:47:24 +00:00
2019-09-20 02:47:32 +00:00
echo >> Changelog.md
echo $date - $version >> Changelog.md
$EDITOR Changelog.md
2018-05-10 12:19:14 +00:00
}
2018-05-12 17:54:34 +00:00
[ -f "DEBIAN/control" ] && {
2018-05-20 18:32:55 +00:00
sed -i "/Version:\ /c\Version:\ $version_sed" "DEBIAN/control"
2018-05-12 17:54:34 +00:00
}