* audio.in (audiofs_list): Fixed quoting issue.

(audiofs_copyout): Likewise.
	* uar.in (mcarfs_copyin): Likewise.
	* uha.in (mchafs_copyout): Likewise.
	* ulha.in (mc_lha_fs_run): Likewise.
This commit is contained in:
Roland Illig 2004-11-10 16:08:00 +00:00
parent bfee231c11
commit de3bc90f37
5 changed files with 24 additions and 16 deletions

View File

@ -1,3 +1,11 @@
2004-11-10 Roland Illig <roland.illig@gmx.de>
* audio.in (audiofs_list): Fixed quoting issue.
(audiofs_copyout): Likewise.
* uar.in (mcarfs_copyin): Likewise.
* uha.in (mchafs_copyout): Likewise.
* ulha.in (mc_lha_fs_run): Likewise.
2004-11-08 Pavel S. Shirshov <me@pavelsh.pp.ru>
* vfs.c (vfs_prefix_to_class): Avoid last class (localfs) that would

View File

@ -18,7 +18,7 @@ audiofs_list()
echo "-r--r--r-- 1 0 0 0 $DATE CDDB"
cdparanoia -Q -d "$1" 2>&1 | grep '^[ 0-9][ 0-9][ 0-9]\.' | while read A B C
do
A=`echo $A | sed -e 's/\.//' -e 's/^\(.\)$/0\1/'`
A=`echo "$A" | sed -e 's/\.//' -e 's/^\(.\)$/0\1/'`
SIZE=`expr 44 + $B \* 2352`
echo "-r--r--r-- 1 0 0 $SIZE $DATE track-${A}.wav"
done
@ -26,7 +26,7 @@ audiofs_list()
audiofs_copyout()
{
if [ "$2" == "CDDB" ]; then
if [ x"$2" = x"CDDB" ]; then
DISCID=`cd-discid "$1" | tr " " "+"`
if [ -z "$DISCID" ]; then
exit 1

View File

@ -22,7 +22,7 @@ mcarfs_copyout ()
mcarfs_copyin ()
{
TMPDIR=`mktemp -d ${MC_TMPDIR:-/tmp}/mctmpdir-uar.XXXXXX` || exit 1
TMPDIR=`mktemp -d "${MC_TMPDIR:-/tmp}/mctmpdir-uar.XXXXXX"` || exit 1
name=`basename "$2"`
(cd "$TMPDIR" && cp -fp "$3" "$name" && $XAR r "$1" "$name")
rm -rf "$TMPDIR"

View File

@ -31,14 +31,14 @@ mchafs_list ()
mchafs_copyout ()
{
TMPDIR=`mktemp -d ${MC_TMPDIR:-/tmp}/mctmpdir-uha.XXXXXX` || exit 1
cd $TMPDIR
TMPDIR=`mktemp -d "${MC_TMPDIR:-/tmp}/mctmpdir-uha.XXXXXX"` || exit 1
cd "$TMPDIR"
$HA xyq "$1" "$2" >/dev/null
cat "$2" > "$3"
cd /
rm -rf $TMPDIR
rm -rf "$TMPDIR"
}
cmd="$1"

View File

@ -98,30 +98,30 @@ mc_lha_fs_copyin ()
NAME2=`basename "$2"`; DIR2=${2%$NAME2}
NAME3=`basename "$3"`; DIR3=${3%$NAME3}
cd ${DIR3}
cd "${DIR3}"
ONE2=${2%%/*}
[ -n ${ONE2} ] || exit 1
[ -e ${ONE2} ] && exit 1
[ -n "${ONE2}" ] || exit 1
[ -e "${ONE2}" ] && exit 1
[ -e ${DIR2} ] || mkdir -p ${DIR2}
[ -e "${DIR2}" ] || mkdir -p "${DIR2}"
ln "$3" "$2" || exit 1
$LHA_PUT "$1" "$2"
rm -r ${ONE2}
rm -r "${ONE2}"
}
# The 'run' command executive to run a command from within an archive
mc_lha_fs_run()
{
TMPDIR=`mktemp -d ${MC_TMPDIR:-/tmp}/mctmpdir-ulha.XXXXXX` || exit 1
trap "rm -rf $TMPDIR; exit 0" 1 2 3 4 15
TMPDIR=`mktemp -d "${MC_TMPDIR:-/tmp}/mctmpdir-ulha.XXXXXX"` || exit 1
trap "rm -rf \"$TMPDIR\"; exit 0" 1 2 3 4 15
TMPCMD=$TMPDIR/run
$LHA_GET "$1" "$2" > $TMPCMD
chmod a+x $TMPCMD
$TMPCMD
rm -rf $TMPDIR
chmod a+x "$TMPCMD"
"$TMPCMD"
rm -rf "$TMPDIR"
}