coreboot-utils/update-snapshots.sh

55 lines
1.5 KiB
Bash
Raw Normal View History

#!/bin/bash
# get upstream revisions
printf "Checking coreboot revision... "
REV=$(svn info svn://coreboot.org/coreboot/trunk/util |grep ^Revision|cut -c11-)
printf "done. (r$REV)\n"
printf "Continue? (YES/no) "
read answer
answer=$(echo $answer|tr "a-z" "A-Z")
if [ "$answer" == "YES" -o "$answer" == "Y" -o "$answer" == "" ]; then
printf "Updating tree... \n"
else
printf "Good bye.\n"
exit 0
fi
osc rm coreboot-utils-r*.tar.bz2
# clean up
printf "Cleaning up... "
rm -rf coreboot-utils-r????
printf "done.\n"
# check out nvramtool
printf "Checking out coreboot-utils r$REV... "
svn export -q svn://coreboot.org/coreboot/trunk/util/ coreboot-utils-r$REV
cd coreboot-utils-r$REV
rm -rf x86emu newconfig abuild analysis compareboard kconfig options xcompile
rm -rf kbuildall optionlist sconfig
cd ..
printf "packing... "
tar cjf coreboot-utils-r$REV.tar.bz2 coreboot-utils-r$REV
printf "done.\n"
sed -i s/Version:.*r[0-9].*$/Version:\ \ \ \ \ \ \ \ r$REV/ \
coreboot-utils.spec
osc add coreboot-utils-r$REV.tar.bz2
mv coreboot-utils.changes coreboot-utils.changes.old
echo "-------------------------------------------------------------------" > \
coreboot-utils.changes
echo "`date` - stepan@coresystems.de" >> \
coreboot-utils.changes
echo >> coreboot-utils.changes
echo "- update to r$REV." >> coreboot-utils.changes
echo >> coreboot-utils.changes
cat coreboot-utils.changes.old >> coreboot-utils.changes
rm coreboot-utils.changes.old
# finished.
ls -la *.bz2