#! /bin/sh
TEMPDIR=/var/tmp
archive=$1

if [ -z $1 ]; then
  echo "give archive file (with full path!) from which the modules should be extracted"
  exit 0
fi

mkdir -p $TEMPDIR/modules
cp $archive $TEMPDIR/modules/modules.cpio.gz
cd $TEMPDIR/modules
gunzip modules.cpio.gz
cpio -i --make-directories < modules.cpio
echo "unpacked modules cpio archive to $TEMPDIR/modules"
echo "please make now any changes to the modules in this archive!"
