commit a369b496505ed51dc78e316f719c49abbb98edda
Author: phantomjinx <[email protected]>
Date: Sun Jan 8 16:53:13 2012 +0000
Add quotes to the $LOG variable in the transcoding scripts
* Allows the LOG path to contain spaces.
* Thanks to Walt Ogburn <reuben at ugcs.caltech.edu> for the bug report and
patch.
scripts/convert-2m4a.sh | 4 ++--
scripts/convert-2mp3.sh | 4 ++--
scripts/convert-2mp4.sh | 8 ++++----
scripts/gtkpod-convert-common.sh | 8 ++++----
4 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/scripts/convert-2m4a.sh b/scripts/convert-2m4a.sh
index 9f0394a..b51d962 100755
--- a/scripts/convert-2m4a.sh
+++ b/scripts/convert-2m4a.sh
@@ -30,9 +30,9 @@ ENCODER="faac"
. ${0%/*}/gtkpod-convert-common.sh
if [ $filetype = "wav" ]; then
- "$encoder" -o "$outfile" $ENCODER_OPTS -w --artist "$artist" --title
"$title" --year "$year" --album "$album" --track "$track" --genre "$genre"
--comment "$comment" "$infile" >> $LOG 2>&1
+ "$encoder" -o "$outfile" $ENCODER_OPTS -w --artist "$artist" --title
"$title" --year "$year" --album "$album" --track "$track" --genre "$genre"
--comment "$comment" "$infile" >> "$LOG" 2>&1
else
- "$decoder" $options "$infile" | "$encoder" -o "$outfile" $ENCODER_OPTS -w
--artist "$artist" --title "$title" --year "$year" --album "$album" --track
"$track" --genre "$genre" --comment "$comment" - >> $LOG 2>&1
+ "$decoder" $options "$infile" | "$encoder" -o "$outfile" $ENCODER_OPTS -w
--artist "$artist" --title "$title" --year "$year" --album "$album" --track
"$track" --genre "$genre" --comment "$comment" - >> "$LOG" 2>&1
fi
# Check result
if [ "x$?" != "x0" ]; then
diff --git a/scripts/convert-2mp3.sh b/scripts/convert-2mp3.sh
index 63b1250..c2f0533 100755
--- a/scripts/convert-2mp3.sh
+++ b/scripts/convert-2mp3.sh
@@ -39,9 +39,9 @@ else
fi
if [ $filetype = "wav" ]; then
- "$encoder" $ENCODER_OPTS --add-id3v2 --tt "$title" --ta "$artist" --tl
"$album" --ty "$year" --tc "$comment" --tn "$track" --tg "$usegenre" "$infile"
"$outfile" >> $LOG 2>&1
+ "$encoder" $ENCODER_OPTS --add-id3v2 --tt "$title" --ta "$artist" --tl
"$album" --ty "$year" --tc "$comment" --tn "$track" --tg "$usegenre" "$infile"
"$outfile" >> "$LOG" 2>&1
else
- "$decoder" $options "$infile" | "$encoder" $ENCODER_OPTS --add-id3v2 --tt
"$title" --ta "$artist" --tl "$album" --ty "$year" --tc "$comment" --tn
"$track" --tg "$usegenre" - "$outfile" >> $LOG 2>&1
+ "$decoder" $options "$infile" | "$encoder" $ENCODER_OPTS --add-id3v2 --tt
"$title" --ta "$artist" --tl "$album" --ty "$year" --tc "$comment" --tn
"$track" --tg "$usegenre" - "$outfile" >> "$LOG" 2>&1
fi
# Check result
if [ "x$?" != "x0" ]; then
diff --git a/scripts/convert-2mp4.sh b/scripts/convert-2mp4.sh
index 5ddd6d7..3450afa 100755
--- a/scripts/convert-2mp4.sh
+++ b/scripts/convert-2mp4.sh
@@ -26,18 +26,18 @@ ENCODER="ffmpeg"
. ${0%/*}/gtkpod-convert-common.sh
-echo "Attempting to convert file $infile" >> $LOG
+echo "Attempting to convert file $infile" >> "$LOG"
-"$encoder" -i "$infile" $ENCODER_OPTS -metadata author="$artist" -metadata
title="$title" -metadata album="$album" -metadata year="$year" -metadata
track="$track" -metadata genre="$genre" -metadata comment="$comment" "$outfile"
>> $LOG 2>&1
+"$encoder" -i "$infile" $ENCODER_OPTS -metadata author="$artist" -metadata
title="$title" -metadata album="$album" -metadata year="$year" -metadata
track="$track" -metadata genre="$genre" -metadata comment="$comment" "$outfile"
>> "$LOG" 2>&1
# Check result
if [ "x$?" != "x0" ]; then
- echo "Failed with status 6" >> $LOG
+ echo "Failed with status 6" >> "$LOG"
exit 6
fi
if [ ! -f "$outfile" ]; then
- echo "Failed with status 6" >> $LOG
+ echo "Failed with status 6" >> "$LOG"
exit 8
fi
diff --git a/scripts/gtkpod-convert-common.sh b/scripts/gtkpod-convert-common.sh
index ca04c78..811df14 100755
--- a/scripts/gtkpod-convert-common.sh
+++ b/scripts/gtkpod-convert-common.sh
@@ -64,7 +64,7 @@ fi
LOG=`dirname "$outfile"`
LOG="$LOG/conversion.log"
-echo "Converting \"$infile\" into \"$outfile\"" >> $LOG
+echo "Converting \"$infile\" into \"$outfile\"" >> "$LOG"
# Checking input file
if [ "$infile" = "" ]; then
@@ -75,13 +75,13 @@ if [ ! -f "$infile" ]; then
fi
# Checking output file
-touch "$outfile" >> $LOG 2>&1
+touch "$outfile" >> "$LOG" 2>&1
if [ "x$?" != "x0" ]; then
exit 2
fi
# Check for the existence of encoder
-encoder=`which $ENCODER` >> $LOG 2>&1
+encoder=`which $ENCODER` >> "$LOG" 2>&1
if [ -z "$encoder" ]; then
exit 5
fi
@@ -104,7 +104,7 @@ esac
# Check for the existence of decoder
if [ $decoder ]; then
- decoder=`which "$decoder"` >> $LOG 2>&1
+ decoder=`which "$decoder"` >> "$LOG" 2>&1
if [ -z "$decoder" ]; then
exit 4
fi
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2