1
0
mirror of https://github.com/rancher/os.git synced 2025-06-18 11:17:25 +00:00
os/scripts/package-initrd

27 lines
417 B
Plaintext
Raw Normal View History

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