Skip to content

Commit

Permalink
Add logic for uncompressed initrd
Browse files Browse the repository at this point in the history
  • Loading branch information
antonym committed Aug 10, 2024
1 parent e4a67d7 commit da8e301
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions root/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ if [[ "${COMPRESS_INITRD}" == "true" ]];then
find . 2>/dev/null | cpio -o -H newc | zstd > /buildout/${INITRD_NAME}
elif [[ "${INITRD_TYPE}" == "gz" ]];then
find . | cpio -o -H newc | gzip -9 > /buildout/${INITRD_NAME}
elif [[ "${INITRD_TYPE}" == "uncomp" ]];then
find . | cpio -o -H newc > /buildout/${INITRD_NAME}
elif [[ "${INITRD_TYPE}" == "arch-xz" ]];then
find . -mindepth 1 -printf '%P\0' | sort -z | LANG=C bsdtar --null -cnf - -T - | LANG=C bsdtar --uid 0 --gid 0 --null -cf - --format=newc @- | xz --check=crc32 > /buildout/${INITRD_NAME}
fi
Expand Down Expand Up @@ -102,6 +104,8 @@ if [[ "${EXTRACT_INITRD}" == "true" ]] && [[ "${INITRD_TYPE}" != "lz4" ]];then
cat ../${INITRD_NAME} | zstd -d | cpio -i -d
elif [[ "${INITRD_TYPE}" == "gz" ]];then
zcat ../${INITRD_NAME} | cpio -i -d
elif [[ "${INITRD_TYPE}" == "uncomp" ]];then
cat ../${INITRD_NAME} | cpio -i -d
fi
break
fi
Expand Down

0 comments on commit da8e301

Please sign in to comment.