package-initrd 343 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. set -e
  3. cd $(dirname $0)/..
  4. BUILD=$(pwd)/build
  5. INITRD_DIR=${BUILD}/initrd
  6. ARTIFACTS=$(pwd)/dist/artifacts
  7. INITRD=${ARTIFACTS}/initrd
  8. mkdir -p ${ARTIFACTS}
  9. if [ "$COMPRESS" == "" ]; then
  10. COMPRESS=lzma
  11. fi
  12. cd ${INITRD_DIR}
  13. echo Creating ${INITRD}
  14. find | cpio -H newc -o | ${COMPRESS} > ${INITRD}
  15. echo Done creating ${INITRD}