remaster/script/set_version.sh

27 lines
510 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
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
}
[ -e "changes/remaster.md" ] && {
echo >> changes/remaster.md
echo $date - $version >> changes/remaster.md
2018-05-12 21:05:54 +00:00
editor changes/remaster.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
}