aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2007-03-19 16:03:21 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2007-03-19 16:03:21 +0000
commitf08f882a8ff3231a30a27db866191feacbced8f5 (patch)
treec2fcf07c9c59f934e6da97cc73d7875ab4176a6b /src
parent0bcda635cb0d2b90e6f7d1718486e9ffeb1d3a71 (diff)
fixed symbolic link creation (stripped paths)
svn path=/trunk/externals/zexy/; revision=7508
Diffstat (limited to 'src')
-rwxr-xr-xsrc/makealias.sh24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/makealias.sh b/src/makealias.sh
index 4617bc9..7b5fef8 100755
--- a/src/makealias.sh
+++ b/src/makealias.sh
@@ -27,17 +27,29 @@ function debug() {
}
function do_makealias() {
+ local source
+ local dest
+
+ source=$1
+ dest=$2
+
if [ "x${CLEANMODE}" = "xyes" ]
then
- if [ -e "$2" ]; then
- debug "removing alias $2"
- rm $2
+ if [ -e "${dest}" ]; then
+ debug "removing alias ${dest}"
+ rm ${dest}
else
- debug "alias $2 does not exist"
+ debug "alias ${dest} does not exist"
fi
else
- debug "aliasing $1 to $2"
- ln -s $1 $2
+ debug "aliasing ${source} to ${dest}"
+ if [ "x${COPYMODE}" = "xyes" ]
+ then
+ cp ${source} ${dest}
+ else
+ source=${source##*/}
+ ln -s ${source} ${dest}
+ fi
fi
}