bootstrap: verify signatures
This commit is contained in:
21
build-test-initrd
Executable file
21
build-test-initrd
Executable file
@ -0,0 +1,21 @@
|
||||
#! /bin/bash
|
||||
|
||||
dir=tmp/test-initrd
|
||||
base_initrd=dist/initrd
|
||||
test_initrd=test-initrd
|
||||
|
||||
set -ex
|
||||
|
||||
rm -fr $dir
|
||||
mkdir $dir
|
||||
|
||||
cpio --quiet --extract --file $base_initrd --directory $dir
|
||||
(cd $test_initrd && find * |cpio --quiet --create -H newc) |cpio --quiet --extract --directory $dir
|
||||
|
||||
(cd $dir && find * |cpio --create -H newc -R 0:0) >test-initrd.cpio
|
||||
|
||||
cpio --quiet -tF test-initrd.cpio
|
||||
if cpio -tF test-initrd.cpio 2>&1 |grep bytes.of.junk; then echo "bad cpio archive"; exit 1; fi
|
||||
|
||||
lz4 -l9v test-initrd.cpio && mv test-initrd.cpio.lz4 test-initrd.cpio
|
||||
|
Reference in New Issue
Block a user