1
0
raspberrypi-eeprom/get-from-git.sh
Guillaume GARDET 8f40636ae6 Accepting request 866520 from home:nsaenzjulienne:branches:hardware:boot
- Update to latest version, and delete 'get-config-from-dt.patch' since it's now upstream
- Address Guillaume's comments about python

OBS-URL: https://build.opensuse.org/request/show/866520
OBS-URL: https://build.opensuse.org/package/show/hardware:boot/raspberrypi-eeprom?expand=0&rev=1
2021-01-25 10:13:01 +00:00

32 lines
836 B
Bash

#!/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