some modification on instpkg
[cmdllinux.git] / scripts / _mkcpio
blob3001123380b4ecbd17920773540a5b0cd1cdff92
1 #!/bin/sh
3 tempfile=`mktemp 2> /dev/null` || tempfile=/tmp/test$$
4 trap "rm -f $tempfile" 0 1 2 5 15
6 cpiofile=file.cpio
7 [ ! -z "$1" ] && cpiofile=$1
9 find -mindepth 1 > $tempfile
10 cpio -o --format=newc < $tempfile > $cpiofile