#!/bin/bash
# Extracts a ramdisk.cpio.gz to a ramdisk subdirectory
# Optionally taking an output to repack the ramdisk into.
# Created by CNexus - XDA Developers.

if [ -z $1 ]
then
echo "Usage: unpack_ramdisk <ramdiskFile>"
exit 0
fi

mkdir ramdisk
cd ramdisk
gunzip -c ../$1 | cpio -i
