[SCM] Debian Live application startscripts branch, master, updated. 4c57a7638a277a0a17d4e7b205856d2df7e94141

Daniel Baumann daniel at debian.org
Sat Nov 29 23:48:26 UTC 2008


The following commit has been merged in the master branch:
commit 4c57a7638a277a0a17d4e7b205856d2df7e94141
Author: Daniel Baumann <daniel at debian.org>
Date:   Sun Nov 30 00:45:01 2008 +0100

    Rewritting and rewrapping all scripts in proper shell code.

diff --git a/contrib/live_bolzplatz b/contrib/live_bolzplatz
index 932af2f..bf2d897 100755
--- a/contrib/live_bolzplatz
+++ b/contrib/live_bolzplatz
@@ -1,7 +1,14 @@
-. $(dirname $0)/start_tools.sh
+#!/bin/sh
+
+set -e
+
+for FUNCTION in /usr/share/live-startscripts/functions/*
+do
+	. ${FUNCTION}
+done
 
 Replace "<width>.*<\/width>" "<width>${_RESOLUTION_X}<\/width>" /opt/bolzplatz2006/data/config/video.xml
 Replace "<height>.*<\/height>" "<height>${_RESOLUTION_Y}<\/height>" /opt/bolzplatz2006/data/config/video.xml
 
 cd /opt/bolzplatz2006/
-./bolzplatz2006.sh
+./bolzplatz2006.sh ${@}
diff --git a/scripts/live_armagetronad b/scripts/live_armagetronad
index ab40ecf..4e5a6bf 100755
--- a/scripts/live_armagetronad
+++ b/scripts/live_armagetronad
@@ -1,7 +1,14 @@
-. $(dirname $0)/start_tools.sh
+#!/bin/sh
+
+set -e
+
+for FUNCTION in /usr/share/live-startscripts/functions/*
+do
+	. ${FUNCTION}
+done
 
 Replace "ARMAGETRON_SCREENMODE .*" "ARMAGETRON_SCREENMODE -1" ~/.armagetronad/var/user.cfg
 Replace "ARMAGETRON_SCREENMODE_W .*" "ARMAGETRON_SCREENMODE_W ${_RESOLUTION_X}" ~/.armagetronad/var/user.cfg
 Replace "ARMAGETRON_SCREENMODE_H .*" "ARMAGETRON_SCREENMODE_H ${_RESOLUTION_Y}" ~/.armagetronad/var/user.cfg
 
-armagetronad
+exec /usr/games/armagetronad ${@}
diff --git a/scripts/live_billardgl b/scripts/live_billardgl
index d955931..dadef87 100755
--- a/scripts/live_billardgl
+++ b/scripts/live_billardgl
@@ -1,15 +1,23 @@
-. $(dirname $0)/start_tools.sh
+#!/bin/sh
+
+set -e
+
+for FUNCTION in /usr/share/live-startscripts/functions/*
+do
+	. ${FUNCTION}
+done
 
 # keep a 4:3 ratio
-if [ $((${_RESOLUTION_X}*3/4)) -le ${_RESOLUTION_Y} ]; then
- # normal or rotated screen
- WIDTH="${_RESOLUTION_X}"
+if [ $((${_RESOLUTION_X}*3/4)) -le ${_RESOLUTION_Y} ]
+then
+	# normal or rotated screen
+	_WIDTH="${_RESOLUTION_X}"
 else
- # widescreen
- # must reduce the with a bit because of kicker and window decoration
- WIDTH=$((${_RESOLUTION_Y}*4/3-106))
+	# widescreen
+	# must reduce the with a bit because of kicker and window decoration
+	_WIDTH="$((${_RESOLUTION_Y}*4/3-106))"
 fi
 
-sed -i -e "8s/.*/${WIDTH}/" ~/.BillardGL.conf.v7
+sed -i -e "8s/.*/${_WIDTH}/" ~/.BillardGL.conf.v7
 
-billard-gl
+exec /usr/games/billard-gl ${@}
diff --git a/scripts/live_chromium b/scripts/live_chromium
index 3a9f866..97a6185 100755
--- a/scripts/live_chromium
+++ b/scripts/live_chromium
@@ -1,11 +1,28 @@
-. $(dirname $0)/start_tools.sh
+#!/bin/sh
+
+set -e
+
+for FUNCTION in /usr/share/live-startscripts/functions/*
+do
+	. ${FUNCTION}
+done
 
 SCREEN_SIZE=0
-[ ${_RESOLUTION_X} -ge 640  -a ${_RESOLUTION_Y} -ge 480 ] && SCREEN_SIZE=1
-[ ${_RESOLUTION_X} -ge 800  -a ${_RESOLUTION_Y} -ge 600 ] && SCREEN_SIZE=2
-[ ${_RESOLUTION_X} -ge 1024 -a ${_RESOLUTION_Y} -ge 768 ] && SCREEN_SIZE=3
-[ ${_RESOLUTION_X} -ge 1280 -a ${_RESOLUTION_Y} -ge 960 ] && SCREEN_SIZE=4
-Replace "screenSize .*" "screenSize $SCREEN_SIZE" ~/.chromium
 
-chromium
+if [ ${_RESOLUTION_X} -ge 640 ] && [ ${_RESOLUTION_Y} -ge 480 ]
+then
+	_SCREEN_SIZE="1"
+elif [ ${_RESOLUTION_X} -ge 800 ] && [ ${_RESOLUTION_Y} -ge 600 ]
+then
+	_SCREEN_SIZE="2"
+elif [ ${_RESOLUTION_X} -ge 1024 ] && [ ${_RESOLUTION_Y} -ge 768 ]
+then
+	_SCREEN_SIZE="3"
+elif [ ${_RESOLUTION_X} -ge 1280 ] && [ ${_RESOLUTION_Y} -ge 960 ]
+then
+	_SCREEN_SIZE="4"
+fi
+
+Replace "screenSize .*" "screenSize ${_SCREEN_SIZE}" ~/.chromium
 
+exec /usr/games/chromium ${@}
diff --git a/scripts/live_enigma b/scripts/live_enigma
index 98a419e..29ff61a 100755
--- a/scripts/live_enigma
+++ b/scripts/live_enigma
@@ -1,23 +1,39 @@
-. $(dirname $0)/start_tools.sh
+#!/bin/sh
+
+set -e
+
+for FUNCTION in /usr/share/live-startscripts/functions/*
+do
+	. ${FUNCTION}
+done
 
 # fullscreen or window?
-if [ $((${_RESOLUTION_X}*3/4)) -eq ${_RESOLUTION_Y} -o $((${_RESOLUTION_X}*4/5)) -eq ${_RESOLUTION_Y} ]; then
- # we have a 4:3 or a 5:4 resolution
- # we can go fullscreen
- Replace "FullScreen\" value=\".*\"" "FullScreen\" value=\"1\"" ~/.enigmarc.xml
+if [ $((${_RESOLUTION_X}*3/4)) -eq ${_RESOLUTION_Y} ] || [ $((${_RESOLUTION_X}*4/5)) -eq ${_RESOLUTION_Y} ]
+then
+	# we have a 4:3 or a 5:4 resolution
+	# we can go fullscreen
+	Replace "FullScreen\" value=\".*\"" "FullScreen\" value=\"1\"" ~/.enigmarc.xml
 else
- # no 4:3 resolution
- # fullscreen would look horrible
- # start in window mode
- Replace "FullScreen\" value=\".*\"" "FullScreen\" value=\"0\"" ~/.enigmarc.xml
- # leave some space for kicker and window decoration
- {_RESOLUTION_Y}=$((${_RESOLUTION_Y}-76))
+	# no 4:3 resolution
+	# fullscreen would look horrible
+	# start in window mode
+	Replace "FullScreen\" value=\".*\"" "FullScreen\" value=\"0\"" ~/.enigmarc.xml
+
+	# leave some space for kicker and window decoration
+	_RESOLUTION_Y="$((${_RESOLUTION_Y}-76))"
 fi
 
 # search for the largest possible resolution
-SCREEN_SIZE=0
-[ ${_RESOLUTION_X} -ge 800  -a ${_RESOLUTION_Y} -ge 600 ] && SCREEN_SIZE=2
-[ ${_RESOLUTION_X} -ge 1024 -a ${_RESOLUTION_Y} -ge 768 ] && SCREEN_SIZE=3
-Replace "VideoMode\" value=\".*\"" "VideoMode\" value=\"$SCREEN_SIZE\"" ~/.enigmarc.xml
+_SCREEN_SIZE="0"
+
+if [ ${_RESOLUTION_X} -ge 800 ] && [ ${_RESOLUTION_Y} -ge 600 ]
+then
+	_SCREEN_SIZE="2"
+elif [ ${_RESOLUTION_X} -ge 1024 ] && [ ${_RESOLUTION_Y} -ge 768 ]
+then
+	_SCREEN_SIZE="3"
+fi
+
+Replace "VideoMode\" value=\".*\"" "VideoMode\" value=\"${_SCREEN_SIZE}\"" ~/.enigmarc.xml
 
-enigma
+exec /usr/games/enigma ${@}
diff --git a/scripts/live_foobillard b/scripts/live_foobillard
index 89f6753..14ca392 100755
--- a/scripts/live_foobillard
+++ b/scripts/live_foobillard
@@ -1,5 +1,12 @@
-. $(dirname $0)/start_tools.sh
+#!/bin/sh
+
+set -e
+
+for FUNCTION in /usr/share/live-startscripts/functions/*
+do
+	. ${FUNCTION}
+done
 
 Replace "geometry=.*" "geometry=${_RESOLUTION_X}x${_RESOLUTION_Y}" ~/.foobillardrc
 
-foobillard
+/usr/games/foobillard ${@}
diff --git a/scripts/live_gcompris b/scripts/live_gcompris
index acb44ec..3e3eff6 100755
--- a/scripts/live_gcompris
+++ b/scripts/live_gcompris
@@ -1,13 +1,21 @@
-. $(dirname $0)/start_tools.sh
+#!/bin/sh
+
+set -e
+
+for FUNCTION in /usr/share/live-startscripts/functions/*
+do
+	. ${FUNCTION}
+done
 
 # fullscreen or window?
-if [ $((${_RESOLUTION_X}*3/4)) -eq ${_RESOLUTION_Y} -o $((${_RESOLUTION_X}*4/5)) -eq ${_RESOLUTION_Y} ]; then
- # we have a 4:3 or a 5:4 resolution
- # we can go fullscreen
- gcompris -f --nolockcheck
+if [ $((${_RESOLUTION_X}*3/4)) -eq ${_RESOLUTION_Y} ] || [ $((${_RESOLUTION_X}*4/5)) -eq ${_RESOLUTION_Y} ]
+then
+	# we have a 4:3 or a 5:4 resolution
+	# we can go fullscreen
+	exec /usr/games/gcompris -f --nolockcheck ${@}
 else
- # no 4:3 or 5:4 resolution
- # fullscreen would look horrible
- # start in window mode
- gcompris -w --nolockcheck
+	# no 4:3 or 5:4 resolution
+	# fullscreen would look horrible
+	# start in window mode
+	exec /usr/games/gcompris -w --nolockcheck ${@}
 fi
diff --git a/scripts/live_glest b/scripts/live_glest
index af846a9..0d02e8e 100755
--- a/scripts/live_glest
+++ b/scripts/live_glest
@@ -1,6 +1,13 @@
-. $(dirname $0)/start_tools.sh
+#!/bin/sh
+
+set -e
+
+for FUNCTION in /usr/share/live-startscripts/functions/*
+do
+	. ${FUNCTION}
+done
 
 Replace "ScreenWidth=.*" "ScreenWidth=${_RESOLUTION_X}" ~/.glest/glest.ini
 Replace "ScreenHeight=.*" "ScreenHeight=${_RESOLUTION_Y}" ~/.glest/glest.ini
 
-glest
+exec /usr/games/glest ${@}
diff --git a/scripts/live_neverball b/scripts/live_neverball
index 9c37621..0c8f921 100755
--- a/scripts/live_neverball
+++ b/scripts/live_neverball
@@ -1,6 +1,13 @@
-. $(dirname $0)/start_tools.sh
+#!/bin/sh
+
+set -e
+
+for FUNCTION in /usr/share/live-startscripts/functions/*
+do
+	. ${FUNCTION}
+done
 
 Replace "width .*" "width                ${_RESOLUTION_X}" ~/.neverball/neverballrc
 Replace "height .*" "height               ${_RESOLUTION_Y}" ~/.neverball/neverballrc
 
-neverball
+exec /usr/games/neverball ${@}
diff --git a/scripts/live_neverputt b/scripts/live_neverputt
index 56d26d1..e12b827 100755
--- a/scripts/live_neverputt
+++ b/scripts/live_neverputt
@@ -1,6 +1,13 @@
-. $(dirname $0)/start_tools.sh
+#!/bin/sh
+
+set -e
+
+for FUNCTION in /usr/share/live-startscripts/functions/*
+do
+	. ${FUNCTION}
+done
 
 Replace "width .*" "width                ${_RESOLUTION_X}" ~/.neverball/neverballrc
 Replace "height .*" "height               ${_RESOLUTION_Y}" ~/.neverball/neverballrc
 
-neverputt
+exec /usr/games/neverputt ${@}
diff --git a/scripts/live_pathological b/scripts/live_pathological
index e51277c..6e03afe 100755
--- a/scripts/live_pathological
+++ b/scripts/live_pathological
@@ -1,13 +1,21 @@
-. $(dirname $0)/start_tools.sh
+#!/bin/sh
+
+set -e
+
+for FUNCTION in /usr/share/live-startscripts/functions/*
+do
+	. ${FUNCTION}
+done
 
 # fullscreen or window?
-if [ $((${_RESOLUTION_X}*3/4)) -eq ${_RESOLUTION_Y} -o $((${_RESOLUTION_X}*4/5)) -eq ${_RESOLUTION_Y} ]; then
- # we have a 4:3 or a 5:4 resolution
- # we can go fullscreen
- pathological -f
+if [ $((${_RESOLUTION_X}*3/4)) -eq ${_RESOLUTION_Y} ] || [ $((${_RESOLUTION_X}*4/5)) -eq ${_RESOLUTION_Y} ]
+then
+	# we have a 4:3 or a 5:4 resolution
+	# we can go fullscreen
+	exec /usr/games/pathological -f ${@}
 else
- # no 4:3 or 5:4 resolution
- # fullscreen would look horrible
- # start in window mode
- pathological
+	# no 4:3 or 5:4 resolution
+	# fullscreen would look horrible
+	# start in window mode
+	exec /usr/games/pathological ${@}
 fi
diff --git a/scripts/live_pingus b/scripts/live_pingus
index 845f4eb..cc6e088 100755
--- a/scripts/live_pingus
+++ b/scripts/live_pingus
@@ -1,3 +1,10 @@
-. $(dirname $0)/start_tools.sh
+#!/bin/sh
 
-pingus -f --geometry=${_RESOLUTION_X}x${_RESOLUTION_Y}
+set -e
+
+for FUNCTION in /usr/share/live-startscripts/functions/*
+do
+	. ${FUNCTION}
+done
+
+exec /usr/games/pingus -f --geometry=${_RESOLUTION_X}x${_RESOLUTION_Y}
diff --git a/scripts/live_ppracer b/scripts/live_ppracer
index 4c5b9a3..aeeae0d 100755
--- a/scripts/live_ppracer
+++ b/scripts/live_ppracer
@@ -1,6 +1,13 @@
-. $(dirname $0)/start_tools.sh
+#!/bin/sh
+
+set -e
+
+for FUNCTION in /usr/share/live-startscripts/functions/*
+do
+	. ${FUNCTION}
+done
 
 Replace "^set x_resolution .*" "set x_resolution ${_RESOLUTION_X}" ~/.ppracer/options
 Replace "^set y_resolution .*" "set y_resolution ${_RESOLUTION_Y}" ~/.ppracer/options
 
-ppracer
+exec /usr/games/ppracer ${@}
diff --git a/scripts/live_stellarium b/scripts/live_stellarium
index ee08143..bfef48c 100755
--- a/scripts/live_stellarium
+++ b/scripts/live_stellarium
@@ -1,5 +1,15 @@
-if [ `ps -A | grep "compiz" | wc -l` -gt '0' ]; then
-	stellarium -f no
+#!/bin/sh
+
+set -e
+
+for FUNCTION in /usr/share/live-startscripts/functions/*
+do
+	. ${FUNCTION}
+done
+
+if [ $(ps -A | grep "compiz" | wc -l) -gt '0' ]
+then
+	exec /usr/bin/stellarium -f no ${@}
 else
-	stellarium -f yes
+	exec /usr/bin/stellarium -f yes ${@}
 fi
diff --git a/scripts/live_tomatoes b/scripts/live_tomatoes
index 003874f..94e1ce7 100755
--- a/scripts/live_tomatoes
+++ b/scripts/live_tomatoes
@@ -1,5 +1,12 @@
-. $(dirname $0)/start_tools.sh
+#!/bin/sh
+
+set -e
+
+for FUNCTION in /usr/share/live-startscripts/functions/*
+do
+	. ${FUNCTION}
+done
 
 Replace "video_mode .*" "video_mode = ${_RESOLUTION_X} x ${_RESOLUTION_Y}" ~/.tomatoes/config.cfg
 
-tomatoes
+exec /usr/games/tomatoes ${@}
diff --git a/scripts/live_trigger b/scripts/live_trigger
index 551d4dd..e3f4c63 100755
--- a/scripts/live_trigger
+++ b/scripts/live_trigger
@@ -1,6 +1,13 @@
-. $(dirname $0)/start_tools.sh
+#!/bin/sh
+
+set -e
+
+for FUNCTION in /usr/share/live-startscripts/functions/*
+do
+	. ${FUNCTION}
+done
 
 Replace "width=.*" "width=\"${_RESOLUTION_X}\"" ~/.trigger/trigger.config
 Replace "height=.*" "height=\"${_RESOLUTION_Y}\"" ~/.trigger/trigger.config
 
-trigger
+exec /usr/games/trigger ${@}
diff --git a/scripts/live_wesnoth b/scripts/live_wesnoth
index 9aea753..49cdbd7 100755
--- a/scripts/live_wesnoth
+++ b/scripts/live_wesnoth
@@ -1,6 +1,13 @@
-. $(dirname $0)/start_tools.sh
+#!/bin/sh
+
+set -e
+
+for FUNCTION in /usr/share/live-startscripts/functions/*
+do
+	. ${FUNCTION}
+done
 
 Replace "xresolution=.*" "xresolution=\"${_RESOLUTION_X}\"" ~/.wesnoth/preferences
 Replace "yresolution=.*" "yresolution=\"${_RESOLUTION_Y}\"" ~/.wesnoth/preferences
 
-wesnoth-nolog
+exec /usr/games/wesnoth-nolog ${@}
diff --git a/scripts/live_xmoto b/scripts/live_xmoto
index 5989aed..34e12d3 100755
--- a/scripts/live_xmoto
+++ b/scripts/live_xmoto
@@ -1,6 +1,13 @@
-. $(dirname $0)/start_tools.sh
+#!/bin/sh
+
+set -e
+
+for FUNCTION in /usr/share/live-startscripts/functions/*
+do
+	. ${FUNCTION}
+done
 
 Replace "DisplayWidth.*" "DisplayWidth\" value=\"${_RESOLUTION_X}\"\/\>" ~/.xmoto/config.dat
 Replace "DisplayHeight.*" "DisplayHeight\" value=\"${_RESOLUTION_Y}\"\/\>" ~/.xmoto/config.dat
 
-xmoto
+exec /usr/games/xmoto ${@}

-- 
Debian Live application startscripts



More information about the debian-live-changes mailing list