X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;ds=sidebyside;f=tools%2Fscripts%2Finstdfs;fp=tools%2Fscripts%2Finstdfs;h=24ebf80854a98db8214bbe29b4d375374df83407;hb=ae47c13224ea63ac83f80ab332f7436b3265cdce;hp=0000000000000000000000000000000000000000;hpb=d3401f8f5fbe0b0a7939ce3a8ef680cf5356f9ba;p=eradicate diff --git a/tools/scripts/instdfs b/tools/scripts/instdfs new file mode 100755 index 0000000..24ebf80 --- /dev/null +++ b/tools/scripts/instdfs @@ -0,0 +1,58 @@ +#!/bin/sh + +# NOTES: +# source: svn co https://svn.code.sf.net/p/etherdfs/code +# +# on DOS: etherdfs C-Z +# on GNU/Linux: sudo ethersrv-linux eth0 /etherdfs +# +# /etherdfs is a mount point for a FAT16 image, fstab entry: +# /home/nuclear/code/dos/etherdfs.img /etherdfs msdos loop,fmask=0113,dmask=0002,gid=6 0 0 + +destdir=/etherdfs/eradicat +rev=false +have_dest_arg=false + +for arg in "$@"; do + case "$arg" in + -r) + rev=true + ;; + + -*) + echo "invalid option: $arg" + exit 1 + ;; + + *) + if $have_dest_arg; then + echo "unexpected argument: $arg" + exit 1 + fi + destdir=$arg + have_dest_arg=true + ;; + esac +done + +if $rev; then + cwd=`pwd` + cd $destdir + destdir=$cwd +else + mkdir -p $destdir/data + cp game.exe $destdir + rm -f $destdir/data/* + cp data/* $destdir/data/ +fi + +findsrc() +{ + find . -name '*.c' -o -name '*.h' -o -name '*.asm' -o -name '*.inc' \ + -o -name '*.inl' -o -name Makefile | sed 's/\.\///' +} +for i in `findsrc`; do + dir=`dirname $i` + mkdir -p $destdir/$dir + cp $i $destdir/$i +done