#!/bin/sh
# Make a cpio archive from the specified directory
DIR=$1
FILE=$2
if [ -z "$DIR" ] || [ ! -d $DIR ]; then 
    echo "need dir as arg1"; 
    exit 1
fi
if [ -z "$FILE" ] ; then FILE=$1; fi

rm -rf $FILE.cpio
(cd $DIR; find . | cpio -H newc -o > ../$FILE.cpio)



