From 7821e8ad9d4df05a6ade4f25b5305636c41458b3 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Wed, 25 Apr 2012 08:03:10 +0000 Subject: [PATCH] getsounds.sh: avoid copying sound files --- build/getsounds.sh.in | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/build/getsounds.sh.in b/build/getsounds.sh.in index f25922c7ef..de6cc72947 100755 --- a/build/getsounds.sh.in +++ b/build/getsounds.sh.in @@ -22,17 +22,17 @@ echo -n "#" pwd echo "# $0 $1 $2" -if [ ! -f $tarfile ] ; then - if [ -f $FS_SOUNDS_DIR/$tarfile ]; then - cp -l $FS_SOUNDS_DIR/$tarfile . \ - || cp $FS_SOUNDS_DIR/$tarfile . - else - $DOWNLOAD_CMD $base$tarfile - if [ ! -f $tarfile ] ; then - echo cannot find $tarfile - exit 1 - fi - fi +if [ -n "$FS_SOUNDS_DIR" ] ; then + [ -d $FS_SOUNDS_DIR ] || mkdir -p $FS_SOUNDS_DIR + DIR=$FS_SOUNDS_DIR +fi + +if [ ! -f $DIR/$tarfile ] ; then + (cd $DIR && $DOWNLOAD_CMD $base$tarfile) + if [ ! -f $DIR/$tarfile ] ; then + echo cannot find $tarfile + exit 1 + fi fi if [ ! -z $install ] ; then