#!/bin/bash
if [ -z $1 ]; then
echo "You must provide a workdir"
exit
fi
if [ ! -d $1 ]; then
echo "Workdir does not exist"
exit
fi
if [[ "$1" != /* ]]; then
echo "You must provide a absolute path to workdir"
exit
fi
if [ -z $2 ]; then
echo "You must provide a iso file"
exit
fi
if [ ! -f $2 ]; then
echo "ISO file $1 does not exist"
exit
fi
sudo uck-remaster-clean $1
sudo uck-remaster-unpack-iso $2 $1
sudo uck-remaster-unpack-rootfs $1