1
0
mirror of https://github.com/rancher/os.git synced 2025-06-22 13:07:04 +00:00
os/scripts/package-initrd
Darren Shepherd 2a60981b09 Build script updates
Always compress with gzip unless we are doing a release.  Also download
rootfs.tar to ${DOWNLOAD} so `dapper -m bind` works better.
2016-06-17 08:00:33 -07:00

22 lines
348 B
Bash
Executable File

#!/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 [ "$COMPRESS" == "" ]; then
COMPRESS="gzip -1"
fi
cd ${INITRD_DIR}
echo Creating ${INITRD}
find | cpio -H newc -o | ${COMPRESS} > ${INITRD}
echo Done creating ${INITRD}