[SCM] vdr packaging repository branch, master, updated. upstream/2.0.0-496-g96a9a6e

etobi git at e-tobi.net
Sat Apr 6 22:12:24 UTC 2013


The following commit has been merged in the master branch:
commit 2b70694893e8c3018ddf9e02dbdde41f2ecd5a5b
Author: Lars Hanisch <dvb at flensrocker.de>
Date:   Sun Apr 7 00:02:39 2013 +0200

    Simplified the commands loader and dropped the ordering via order.reccmds.conf / order.commands.conf

diff --git a/debian/changelog b/debian/changelog
index e850aa6..075bb98 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ vdr (2.0.0-1) UNRELEASED; urgency=low
   * Append CPPFLAGS to CFLAGS, so this gets stored in vdr.pc
     and can be used by plugins
   * Added upstream fix vdr-2.0.0-fixkeeptracksinit.diff
+  * Simplified the commands loader and dropped the ordering via
+    order.reccmds.conf / order.commands.conf
 
  -- Tobias Grimm <etobi at debian.org>  Sun, 31 Mar 2013 13:41:03 +0200
 
diff --git a/debian/commands-loader.sh b/debian/commands-loader.sh
index bf88e9f..0092f34 100644
--- a/debian/commands-loader.sh
+++ b/debian/commands-loader.sh
@@ -12,50 +12,17 @@ echo -e \
 "#\n\n\n"
 }
 
-# merges single <cmdtype>.<name>.conf files into one <cmdtype>.conf using
-# the order defined in order.<cmdtype>.conf
+# merges single <cmdtype>.<name>.conf files into one <cmdtype>.conf
+# in alphabetical order
 mergecommands ()
 {
-    local cmd
-    local cmds
-    local cmdsorder
-    local line
     local cmdtype
     local cmdfile
-    local ordered_cmds
 
     cmdtype=$1
     cmdfile="/var/cache/vdr/$cmdtype.conf"
 
     writewarning $cmdtype > "$cmdfile"
 
-    cmdsorder=( `cat /etc/vdr/command-hooks/order.$cmdtype.conf | sed "s/#.*$//"` )
-    cmds=( `find $CMDHOOKSDIR -maxdepth 1 -name "$cmdtype.*.conf" -printf "%f \n" | sed "s/$cmdtype\.\(.\+\)\.conf/\1/g"` )
-
-    # first the ordered commands:
-    for cmd in ${cmdsorder[@]}; do
-        for (( line=0 ; line<${#cmds[@]} ; line++ )); do
-            if [ "$cmd" = "-${cmds[$line]}" ]; then
-                unset cmds[$line]
-                cmds=( "${cmds[@]}" )
-                break
-            fi
-            if [ "$cmd" = "${cmds[$line]}" ]; then
-                ordered_cmds=( "${ordered_cmds[@]}" "${cmds[$line]}" )
-                unset cmds[$line]
-                cmds=( "${cmds[@]}" )
-                break
-            fi
-        done
-    done
-    # then the remaining unordered commands:
-    ordered_cmds=( "${ordered_cmds[@]}" "${cmds[@]}" )
-
-    # concatenate all commands
-    for cmd in ${ordered_cmds[@]}; do
-        if [ "$cmd" != "" ]; then
-            cat "$CMDHOOKSDIR/$cmdtype.$cmd.conf" >> "$cmdfile" || true
-            echo "" >> "$cmdfile"
-        fi
-    done
+    find $CMDHOOKSDIR -maxdepth 1 -name "$cmdtype.*.conf" | sort | xargs cat >> "$cmdfile"
 }
diff --git a/debian/order.commands.conf b/debian/order.commands.conf
deleted file mode 100644
index ac028f3..0000000
--- a/debian/order.commands.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# If you like a fixed order in your commands menu, place the command base names
-# (commands.<basename>.conf) here.
-#
-# If you want a certain command file not to be loaded automatically at 
-# vdr-startup, then you can simply write "-basename" in this file.
-
-firstcommand
-secondcommand
--thirdcommand
diff --git a/debian/order.reccmds.conf b/debian/order.reccmds.conf
deleted file mode 100644
index 8037552..0000000
--- a/debian/order.reccmds.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# If you like a fixed order in your recording commands menu, place the 
-# command base names (reccmds.<basename>.conf) here.
-#
-# If you want a certain command file not to be loaded automatically at 
-# vdr-startup, then you can simply write "-basename" in this file.
-
-firstcommand
-secondcommand
--thirdcommand
diff --git a/debian/vdr.install b/debian/vdr.install
index 5797592..c9745be 100644
--- a/debian/vdr.install
+++ b/debian/vdr.install
@@ -25,8 +25,6 @@ debian/vdr.groups                       etc/vdr/
 debian/R90.custom                       etc/vdr/recording-hooks/
 debian/S90.custom                       etc/vdr/shutdown-hooks/
 debian/order.conf                       etc/vdr/plugins/
-debian/order.commands.conf              etc/vdr/command-hooks/
-debian/order.reccmds.conf               etc/vdr/command-hooks/
 debian/commands.custom.conf             etc/vdr/command-hooks/
 debian/reccmds.custom.conf              etc/vdr/command-hooks/
 

-- 
vdr packaging repository



More information about the pkg-vdr-dvb-changes mailing list