#!/bin/bash set -e cd $(dirname $0)/.. BUILD=$(pwd)/build INITRD_DIR=${BUILD}/initrd ARTIFACTS=$(pwd)/dist/artifacts INITRD=${ARTIFACTS}/initrd mkdir -p ${ARTIFACTS} if [ ! -f ${ARTIFACTS}/vmlinuz ]; then exit 0 fi if [ "$COMPRESS" == "" ]; then COMPRESS="gzip -1" fi cd ${INITRD_DIR} echo Creating ${INITRD} find | cpio -H newc -o | ${COMPRESS} > ${INITRD} echo Done creating ${INITRD}