#!/bin/bash # this is a huge hunk of stuff, so reuse the local repo if possible if [ -d rpi-eeprom/.git ]; then cd rpi-eeprom git pull cd .. else set -e git clone --depth 1 https://github.com/raspberrypi/rpi-eeprom.git set +e fi TOPDIR=$(pwd) SOURCES="rpi-eeprom-* firmware LICENSE" cd rpi-eeprom LINE=$(git log --format=format:"%h %ai" -- ${SOURCES}|head -n 1) set -- $LINE REV=$1 DATE=$2 VER=${DATE//-/.} set -e git archive --prefix=raspberrypi-eeprom-$VER/ -o $TOPDIR/raspberrypi-eeprom-${VER}.tar master -- ${SOURCES} cd $TOPDIR osc rm -f raspberrypi-eeprom-*.tar.bz2 || true bzip2 --force raspberrypi-eeprom-${VER}.tar osc add raspberrypi-eeprom-${VER}.tar.bz2 sed -i "s/^Version:.*/Version: $VER/" raspberrypi-eeprom.spec osc vc raspberrypi-eeprom -m "Update to $REV ($DATE)" osc service localrun format_spec_file