aboutsummaryrefslogtreecommitdiff
path: root/hello/prepare-svn.sh
diff options
context:
space:
mode:
authorBryan Jurish <mukau@users.sourceforge.net>2009-03-07 19:51:54 +0000
committerBryan Jurish <mukau@users.sourceforge.net>2009-03-07 19:51:54 +0000
commite9372d1375b01e8aa47bc6e848ddbbf139fe9cb8 (patch)
tree9f94c68c4a7d19849e762446a5c52ff4d1020aab /hello/prepare-svn.sh
parenta154d88d889a40dc8fd5641aa0d2458d777c4c5a (diff)
+ updated 'hello' example external: eliminate build-time dependence on svn:special symlinks
svn path=/trunk/externals/moocow/; revision=10844
Diffstat (limited to 'hello/prepare-svn.sh')
-rwxr-xr-xhello/prepare-svn.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/hello/prepare-svn.sh b/hello/prepare-svn.sh
new file mode 100755
index 0000000..58830ae
--- /dev/null
+++ b/hello/prepare-svn.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+USAGE="$0 {copy|link} [COMMON_SRC=../common] [COMMON_DST=./common]"
+
+if test -n "$1"; then
+ case "$1" in
+ copy)
+ CP="cp -a";
+ ;;
+ link)
+ CP="ln -s";
+ ;;
+ *)
+ echo "Usage: $USAGE"
+ exit 1;
+ ;;
+ esac
+else
+ CP="ln -s"
+fi
+
+if test -n "$2"; then
+ COMMON_SRC="$2";
+else
+ COMMON_SRC="../common";
+fi
+
+if test -n "$3"; then
+ COMMON_DST="$3";
+else
+ COMMON_DST="./common";
+fi
+
+##-- copy or link in common dir
+rm -rf "$COMMON_DST";
+$CP "$COMMON_SRC" "$COMMON_DST";