From 10fb3f22f6e70c95437944a0edc18a09e6f3bcec Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 8 Aug 2003 22:07:16 +0000 Subject: [PATCH] * extfs/audio.in: Further portability fixes. Use current date for timestamps. Partly from Andrew V. Samoilov --- vfs/ChangeLog | 4 ++++ vfs/extfs/audio.in | 14 +++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/vfs/ChangeLog b/vfs/ChangeLog index 108de0622..689ecf28a 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,5 +1,9 @@ 2003-08-08 Pavel Roskin + * extfs/audio.in: Further portability fixes. Use current date + for timestamps. + Partly from Andrew V. Samoilov + * extfs/audio.in: Fix non-POSIX constructs. From GoTaR diff --git a/vfs/extfs/audio.in b/vfs/extfs/audio.in index 33f88b036..8d2572cd0 100755 --- a/vfs/extfs/audio.in +++ b/vfs/extfs/audio.in @@ -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