Dan's gather scripts that uses hard link for windows. Not used as default.
authorGengbin Zheng <gzheng@illinois.edu>
Fri, 5 Nov 2010 05:55:53 +0000 (00:55 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Fri, 5 Nov 2010 05:55:53 +0000 (00:55 -0500)
src/arch/win32/gatherflat.local [new file with mode: 0755]
src/arch/win32/gathertree.local [new file with mode: 0755]

diff --git a/src/arch/win32/gatherflat.local b/src/arch/win32/gatherflat.local
new file mode 100755 (executable)
index 0000000..75afa90
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+[ ! -d $1 ] && exit 0;
+
+SYSLN='ln -s -f'
+
+[ $OS = 'Windows_NT' ] && SYSLN='ln -f'
+
+SRC=$1
+DST=$2
+
+[ ! -d $DST ] && mkdir $DST
+
+for file in `find $SRC -name CVS -prune -o -type f -print`
+do
+    $SYSLN $file $DST
+done
diff --git a/src/arch/win32/gathertree.local b/src/arch/win32/gathertree.local
new file mode 100755 (executable)
index 0000000..45d794d
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+[ ! -d $1 ] && exit 0
+[ ! -d $2 ] && mkdir $2
+
+SYSLN='ln -s -f'
+[ $OS = Windows_NT ] && SYSLN='ln -f'
+
+pushd $1 > /dev/null
+SRC=`pwd`
+popd > /dev/null
+
+pushd $2 > /dev/null
+DST=`pwd`
+popd > /dev/null
+
+cd $SRC
+for file in `find . -name CVS -prune -o -print`
+do
+       if [ -d $file ]; then
+               mkdir -p $DST/$file
+       elif [ -f $file ]; then
+               $SYSLN $SRC/$file $DST/$file
+       fi
+done