diff options
author | Bryan Jurish <mukau@users.sourceforge.net> | 2009-03-07 20:58:22 +0000 |
---|---|---|
committer | Bryan Jurish <mukau@users.sourceforge.net> | 2009-03-07 20:58:22 +0000 |
commit | e7bd2d1954b8e9ec7b9d5e3b1dae30ef97d69032 (patch) | |
tree | bb70cd86f0ad1263b83d19e688815699006efaab /common/svn-prepare.sh | |
parent | e9372d1375b01e8aa47bc6e848ddbbf139fe9cb8 (diff) |
+ eliminated build-time dependence on svn:special symlinks
svn path=/trunk/externals/moocow/; revision=10845
Diffstat (limited to 'common/svn-prepare.sh')
-rwxr-xr-x | common/svn-prepare.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/common/svn-prepare.sh b/common/svn-prepare.sh new file mode 100755 index 0000000..6edae1a --- /dev/null +++ b/common/svn-prepare.sh @@ -0,0 +1,41 @@ +#!/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 +runcmd() { + echo "$0[`basename \`pwd\``]:" "$@" + $@ +} + +runcmd rm -rf "$COMMON_DST"; +runcmd $CP "$COMMON_SRC" "$COMMON_DST"; |