提交 0ec4e826 authored 作者: Travis Cross's avatar Travis Cross

getsounds.sh: look for a locally-cached copy first

This lets you specify a FS_SOUNDS_DIR in which to look for the sound
tarballs.  This makes it easier to use git clean -fdx without
downloading the sounds every time.
上级 d5766cea
...@@ -23,10 +23,15 @@ pwd ...@@ -23,10 +23,15 @@ pwd
echo "# $0 $1 $2" echo "# $0 $1 $2"
if [ ! -f $tarfile ] ; then if [ ! -f $tarfile ] ; then
$DOWNLOAD_CMD $base$tarfile if [ -f $FS_SOUNDS_DIR/$tarfile ]; then
if [ ! -f $tarfile ] ; then test ! cp -l $FS_SOUNDS_DIR/$tarfile . \
echo cannot find $tarfile || cp $FS_SOUNDS_DIR/$tarfile .
exit 1 else
$DOWNLOAD_CMD $base$tarfile
if [ ! -f $tarfile ] ; then
echo cannot find $tarfile
exit 1
fi
fi fi
fi fi
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论