abootimg/pack-initrd
2011-05-03 22:34:41 +02:00

19 lines
284 B
Bash
Executable File

#!/bin/sh
#
initrd=${1:-initrd.img}
ramdisk=${2:-ramdisk}
if [ ! -d $ramdisk ]; then
echo "$ramdisk does not exist."
exit 1
fi
if [ -f $initrd ]; then
echo "$initrd already exist."
exit 1
fi
( cd $ramdisk; find | sort | cpio --quiet -o -H newc ) | gzip > $initrd