add '-c' option to updatemakes.sh

This commit is contained in:
Steffen Jaeckel 2017-03-01 16:00:13 +01:00
parent 2df86d65e8
commit 199ff63e5f

View File

@ -1,29 +1,26 @@
#!/bin/bash #!/bin/bash
makefiles=(makefile makefile.icc makefile.shared makefile.unix makefile.mingw)
function update_makefile() {
perl filter.pl $1 tmplist
sed -e 's/ *$//' < tmp.delme > $1
rm -f tmp.delme
}
bash genlist.sh > tmplist bash genlist.sh > tmplist
perl filter.pl makefile tmplist for i in "${makefiles[@]}"
sed -e 's/ *$//' < tmp.delme > makefile do
rm -f tmp.delme update_makefile "$i"
done
perl filter.pl makefile.icc tmplist
sed -e 's/ *$//' < tmp.delme > makefile.icc
rm -f tmp.delme
perl filter.pl makefile.shared tmplist
sed -e 's/ *$//' < tmp.delme > makefile.shared
rm -f tmp.delme
perl filter.pl makefile.unix tmplist
sed -e 's/ *$//' < tmp.delme > makefile.unix
rm -f tmp.delme
perl filter.pl makefile.mingw tmplist
sed -e 's/ *$//' < tmp.delme > makefile.mingw
rm -f tmp.delme
perl filter.pl makefile.msvc tmplist perl filter.pl makefile.msvc tmplist
sed -e 's/\.o /.obj /g' -e 's/ *$//' < tmp.delme > makefile.msvc sed -e 's/\.o /.obj /g' -e 's/ *$//' < tmp.delme > makefile.msvc
rm -f tmp.delme rm -f tmp.delme
rm -f tmplist rm -f tmplist
if [ $# -eq 1 ] && [ "$1" == "-c" ]; then
git add ${makefiles[@]} makefile.msvc && git commit -m 'Update makefiles'
fi