summaryrefslogtreecommitdiff
path: root/ACE/bin/clone.csh
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/bin/clone.csh')
-rw-r--r--ACE/bin/clone.csh26
1 files changed, 26 insertions, 0 deletions
diff --git a/ACE/bin/clone.csh b/ACE/bin/clone.csh
new file mode 100644
index 00000000000..1c14e912d64
--- /dev/null
+++ b/ACE/bin/clone.csh
@@ -0,0 +1,26 @@
+#!/bin/csh
+
+set src_root=`pwd`
+set dst_root=`abspath $1`
+
+set subdirs=`find * -type d -print`
+
+mkdir $dst_root
+set files=`find * \( -type d -prune \) -o -type f -print`
+
+if ($#files) then
+ ln $files $dst_root
+endif
+
+if ($#subdirs) then
+ foreach subdir ($subdirs)
+ cd $src_root
+ mkdir $dst_root/$subdir
+ cd $src_root/$subdir
+ set files=`find * \( -type d -prune \) -o -type f -print`
+ if ($#files) then
+ ln $files $dst_root/$subdir
+ endif
+ end
+endif
+exit 0