2016-05-06 10:12:09 -07:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
|
|
|
|
BUILD=$(pwd)/build
|
|
|
|
INITRD_DIR=${BUILD}/initrd
|
|
|
|
ARTIFACTS=$(pwd)/dist/artifacts
|
|
|
|
INITRD=${ARTIFACTS}/initrd
|
|
|
|
|
2016-05-22 23:11:26 -07:00
|
|
|
mkdir -p ${ARTIFACTS}
|
|
|
|
|
2016-06-29 22:09:37 -07:00
|
|
|
if [ ! -f ${ARTIFACTS}/vmlinuz ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2016-05-22 23:11:26 -07:00
|
|
|
if [ "$COMPRESS" == "" ]; then
|
2016-06-17 07:59:11 -07:00
|
|
|
COMPRESS="gzip -1"
|
2016-05-22 23:11:26 -07:00
|
|
|
fi
|
|
|
|
|
|
|
|
cd ${INITRD_DIR}
|
2016-05-06 10:12:09 -07:00
|
|
|
|
2016-05-22 23:11:26 -07:00
|
|
|
echo Creating ${INITRD}
|
|
|
|
find | cpio -H newc -o | ${COMPRESS} > ${INITRD}
|
|
|
|
echo Done creating ${INITRD}
|