* extfs/audio.in: Further portability fixes. Use current date

for timestamps.
Partly from Andrew V. Samoilov <sav@bcs.zp.ua>
This commit is contained in:
Pavel Roskin 2003-08-08 22:07:16 +00:00
parent 0a0ac18aae
commit 10fb3f22f6
2 changed files with 11 additions and 7 deletions

View File

@ -1,5 +1,9 @@
2003-08-08 Pavel Roskin <proski@gnu.org>
* extfs/audio.in: Further portability fixes. Use current date
for timestamps.
Partly from Andrew V. Samoilov <sav@bcs.zp.ua>
* extfs/audio.in: Fix non-POSIX constructs.
From GoTaR <gotar@poczta.onet.pl>

View File

@ -14,13 +14,13 @@ CDDB_TIMEOUT=20 # in seconds
audiofs_list ()
{
echo "-r--r--r-- 1 0 0 0 Jan 1 0:00 CDDB"
cdparanoia -Q -d $1 2>&1 | grep '^[ 0-9][ 0-9][ 0-9]\.' | while true
DATE=`date +"%b %d %H:%M"`
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
read A B C || break
A=`echo $A | sed -e 's/\.//' -e 's/^\(.\)$/0\1/'`
SIZE=$((44+$B*2352))
echo "-r--r--r-- 1 0 0 $SIZE Jan 1 0:00 track-${A}.wav"
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
}
@ -40,7 +40,7 @@ audiofs_copyout ()
}
if [ ! -b "$2" ]
then
then
BASE=/dev/cdrom
else
BASE=$2