[SCM] debian-live/autotesting branch, master, updated. 9c5143b50da2155314f60f09166d45a23b762492

Chris Lamb chris at chris-lamb.co.uk
Fri Aug 8 22:58:05 UTC 2008


The following commit has been merged in the master branch:
commit cf6732d8ae6d8f860bff895cf1f2da5ce51f0a80
Author: Chris Lamb <chris at chris-lamb.co.uk>
Date:   Fri Aug 8 23:05:16 2008 +0100

    Use ${FOO:-bar} syntax instead of ugly conditionals.
    
    Signed-off-by: Chris Lamb <chris at chris-lamb.co.uk>

diff --git a/autotesting.sh b/autotesting.sh
index daa028b..5c45ad9 100755
--- a/autotesting.sh
+++ b/autotesting.sh
@@ -38,19 +38,10 @@ fi
 ISODIR=$1
 VIDEODIR=$2
 
-if [ "$VQBI" = "" ]; then
- VQBI="video-qemu-booting-iso.sh"
-fi
-if [ "$QEMU_BIN" = "" ]; then
- QEMU_BIN="qemu"
- #qemu_0.8.4-etch1
-fi
-if [ "$TIME_Q" = "" ]; then
- TIME_Q="1200"
-fi
-if [ "$VQUALITY" = "" ]; then
- VQUALITY="5"
-fi
+VQBI="${VQBI:-video-qemu-booting-iso.sh}"
+QEMU_BIN="${QEMU:-qemu}" #qemu_0.8.4-etch1
+TIME_Q="${TIME_Q:-1200}"
+VQUALITY="${VQUALITY:-5}"
 
 for ISO in $ISODIR/*.iso
 do
diff --git a/video-qemu-booting-iso.sh b/video-qemu-booting-iso.sh
index 67b32e0..bfde8ee 100755
--- a/video-qemu-booting-iso.sh
+++ b/video-qemu-booting-iso.sh
@@ -53,33 +53,17 @@ IPADDRESS="127.0.0.1"
 
 get_options_and_defaults ()
 {
-if [ "$SENDKEYS" = "" ]; then
- SENDKEYS="spc,l,i,v,e,spc,kp_enter"
-fi
-if [ "$QEMU_MONITOR_PORT" = "" ]; then
- QEMU_MONITOR_PORT=4444
-fi
-if [ "$GEOMETRY" = "" ]; then
- GEOMETRY="1280x960"
-fi
-if [ "$CONVERT_DIM" = "" ]; then
- CONVERT_DIM="800x600"
-fi
-FFMPEG_DIM_SCALE=$(echo "$CONVERT_DIM" | sed s/x/\ -y\ /g)
-FFMPEG_DIM_SCALE="-x $FFMPEG_DIM_SCALE"
-if [ "$TIME_Q" = "" ]; then
- TIME_Q="600"
-fi
-if [ "$VQUALITY" = "" ]; then
- VQUALITY="5"
-fi
-if [ "$QEMU_BIN" = "" ]; then
- QEMU_BIN="qemu"
- #qemu_0.8.4-etch1
-fi
+    SENDKEYS="${SENDKEYS:-spc,l,i,v,e,spc,kp_enter}"
+    QEMU_MONITOR_PORT="${QEMU_MONITOR_PORT:-4444}"
+    GEOMETRY="${GEOMETRY:-1280x960}"
+    CONVERT_DIM="${CONVERT_DIM:-800x600}"
+    FFMPEG_DIM_SCALE=$(echo "$CONVERT_DIM" | sed s/x/\ -y\ /g)
+    FFMPEG_DIM_SCALE="-x $FFMPEG_DIM_SCALE"
+    TIME_Q="${TIME_Q:-600}"
+    VQUALITY="${VQUALITY:-5}"
+    QEMU_BIN="${QEMU_BIN:-qemu}" #qemu_0.8.4-etch1
 }
 
-
 set_up_workspace ()
 {
 mkdir $TMP_DIR 2>/dev/null

-- 
debian-live/autotesting



More information about the debian-live-changes mailing list