[SCM] xbmc/master: Fix bashisms in shell scripts

rbalint at users.alioth.debian.org rbalint at users.alioth.debian.org
Sun Dec 7 12:05:48 UTC 2014


The following commit has been merged in the master branch:
commit 9a6b65c79c0c884fa9d6e558eebfd6e7d75bda75
Author: Balint Reczey <balint at balintreczey.hu>
Date:   Sat Dec 6 17:42:05 2014 +0100

    Fix bashisms in shell scripts
    
    Closes: #772347

diff --git a/debian/patches/0019-Fix-bashisms-in-shell-scripts.patch b/debian/patches/0019-Fix-bashisms-in-shell-scripts.patch
new file mode 100644
index 0000000..1257277
--- /dev/null
+++ b/debian/patches/0019-Fix-bashisms-in-shell-scripts.patch
@@ -0,0 +1,49 @@
+From e0fa3f413bf56670c7fe2185f4d2c998cbf73647 Mon Sep 17 00:00:00 2001
+From: Balint Reczey <balint at balintreczey.hu>
+Date: Sat, 6 Dec 2014 17:29:18 +0100
+Subject: [PATCH] Fix bashisms in shell scripts
+
+Bashisms in scripts may cause problems on systems where the default
+shell is not Bash.
+
+diff --git a/tools/Linux/xbmc-standalone.sh.in b/tools/Linux/xbmc-standalone.sh.in
+index d392a6c..0d24fcd 100644
+--- a/tools/Linux/xbmc-standalone.sh.in
++++ b/tools/Linux/xbmc-standalone.sh.in
+@@ -34,7 +34,7 @@ do
+   $XBMC
+   RET=$?
+   NOW=$(date +%s)
+-  if [ $(( ($RET >= 64 && $RET <=66) || $RET == 0 )) = "1" ]; then # clean exit
++  if [ $(( ($RET >= 64 && $RET <=66) || $RET = 0 )) = "1" ]; then # clean exit
+     LOOP=0
+   else # crash
+     DIFF=$((NOW-LASTSUCCESSFULSTART))
+diff --git a/tools/Linux/xbmc.sh.in b/tools/Linux/xbmc.sh.in
+index db99670..d80392c 100644
+--- a/tools/Linux/xbmc.sh.in
++++ b/tools/Linux/xbmc.sh.in
+@@ -78,8 +78,8 @@ print_crash_report()
+   echo >> $FILE
+   echo "############### STACK TRACE #################" >> $FILE
+   if which gdb >/dev/null 2>&1; then
+-    if which systemd-coredumpctl &> /dev/null; then
+-      systemd-coredumpctl dump -o core xbmc.bin &> /dev/null
++    if which systemd-coredumpctl > /dev/null 2>&1; then
++      systemd-coredumpctl dump -o core xbmc.bin > /dev/null 2>&1
+     fi
+     single_stacktrace "$PWD" 1
+     # Find in plugins directories
+@@ -134,10 +134,10 @@ do
+   LOOP=0
+   "$LIBDIR/xbmc/xbmc.bin" $SAVED_ARGS
+   RET=$?
+-  if [ $(( $RET == 65 )) = "1" ]
++  if [ $(( $RET = 65 )) = "1" ]
+   then # User requested to restart app
+     LOOP=1
+-  elif [ $(( ($RET >= 131 && $RET <= 136) || $RET == 139 )) = "1" ]
++  elif [ $(( ($RET >= 131 && $RET <= 136) || $RET = 139 )) = "1" ]
+   then # Crashed with core dump
+     print_crash_report
+   fi
diff --git a/debian/patches/series b/debian/patches/series
index 416fcf5..11b7552 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -13,6 +13,7 @@
 0016-mips-Fix-build-with-using-OpenGL-rendering.patch
 0017-libav-Fix-uninitialized-read.patch
 0018-linux-Check-for-Logind-first-then-Kit-s-with-UPower-.patch
+0019-Fix-bashisms-in-shell-scripts.patch
 03-privacy.patch
 04-differentiate-from-vanilla-XBMC.patch
 05-Fix-GLES-with-X11.patch

-- 
xbmc packaging



More information about the pkg-multimedia-commits mailing list