diff --git a/scripts/release b/scripts/release index e036a3a..5d2be28 100755 --- a/scripts/release +++ b/scripts/release @@ -9,14 +9,14 @@ fi echo echo "--- ${KERNEL_VERSION} Kernel prepared for RancherOS" -echo " ./dist/kernel/linux-${KERNEL_VERSION}-src.tgz" -echo " ./dist/kernel/extra-linux-${KERNEL_VERSION}-x86.tar.gz" -echo " ./dist/kernel/build-linux-${KERNEL_VERSION}-x86.tar.gz" -echo " ./dist/kernel/linux-${KERNEL_VERSION}-x86.tar.gz" -echo " ./dist/kernel/config" -echo " ./dist/kernel/modules-main.list" -echo " ./dist/kernel/modules-extra.list" -echo " ./release.log" +echo " ./dist/kernel/linux-${KERNEL_VERSION}-src.tgz" +echo " ./dist/kernel/extra-linux-${KERNEL_VERSION}-x86.tar.gz" +echo " ./dist/kernel/build-linux-${KERNEL_VERSION}-x86.tar.gz" +echo " ./dist/kernel/linux-${KERNEL_VERSION}-x86.tar.gz" +echo " ./dist/kernel/config" +echo " ./dist/kernel/modules-main.list" +echo " ./dist/kernel/modules-extra.list" +echo " ./release.log" echo echo "Images ready to push:" cat dist/images diff --git a/scripts/test-firmware b/scripts/test-firmware index 8b95791..e07943c 100755 --- a/scripts/test-firmware +++ b/scripts/test-firmware @@ -6,28 +6,28 @@ cd $(dirname $0)/.. FIRMWARE=$(readlink -f scripts/firmware) echo "FIRMWARE test: $FIRMWARE" - if [ ! -e linux-firmware ]; then - git clone git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git - fi +if [ ! -e linux-firmware ]; then + git clone git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git +fi - cd linux-firmware +cd linux-firmware - for i in $(<$FIRMWARE); do - if [ -e $i ]; then - glob=$(echo $i | sed 's/^\(.*\)-\([^-]*\)\.\([^.]*\)/\1-*.\3/') - #echo Found $i, trying $glob - latest=$(ls $glob | xargs -n1 -I{} -- git log -1 --format="%ai {}" {} | sort | tail -n1 | cut -d " " -f4) - if [ "$latest" != "$i" ]; then - echo "ERROR: Firmware $i in $FIRMWARE is not the latest - update to $latest" - STOP="1" - echo $latest >> new-firmware - else - echo $i >> new-firmware - fi +for i in $(<$FIRMWARE); do + if [ -e $i ]; then + glob=$(echo $i | sed 's/^\(.*\)-\([^-]*\)\.\([^.]*\)/\1-*.\3/') + #echo Found $i, trying $glob + latest=$(ls $glob | xargs -n1 -I{} -- git log -1 --format="%ai {}" {} | sort | tail -n1 | cut -d " " -f4) + if [ "$latest" != "$i" ]; then + echo "ERROR: Firmware $i in $FIRMWARE is not the latest - update to $latest" + STOP="1" + echo $latest >> new-firmware else - echo WARNING: Firmware listed in $FIRMWARE Not found $i + echo $i >> new-firmware fi - done + else + echo WARNING: Firmware listed in $FIRMWARE Not found $i + fi +done if [ "$STOP" != "" ]; then echo "Update the $FIRMWARE file:"