You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
280 B

#!/bin/bash
set -e
if [ "$1" = "-h" -o "$1" = "--help" -o "$2" = "" ]; then
echo ""
echo "Unpack initramfs image to a directory"
echo "Usage: $0 [source_initramfs_file.img] [target_directory]"
echo ""
exit 2
fi
mkdir -p "$2"
(cd "$2"; xz -d | cpio -idv) < "$1"