1
0
mirror of https://github.com/rancher/os.git synced 2025-06-04 04:40:16 +00:00
os/scripts/package-initrd
gizmotronic 015deae38c Restore the missing initrd artifact.
This reverts only the path-related changes in b3a9893.
2017-02-02 23:39:20 -06:00

28 lines
530 B
Bash
Executable File

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