[SCM] jackd2/master: Tidy shell scripts: Use tab indentation. if-then on single line. Strip trailing space.

js at users.alioth.debian.org js at users.alioth.debian.org
Thu Dec 27 11:58:11 UTC 2012


The following commit has been merged in the master branch:
commit 19a7982ccc1b727bdcf957322097f735ec510034
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Thu Dec 27 12:40:29 2012 +0100

    Tidy shell scripts: Use tab indentation. if-then on single line. Strip trailing space.

diff --git a/debian/bash_completion.d/jackd b/debian/bash_completion.d/jackd
index 60b9af4..a6e2413 100644
--- a/debian/bash_completion.d/jackd
+++ b/debian/bash_completion.d/jackd
@@ -13,8 +13,8 @@
 #   COMPREPLY array variable contains possible completions
 
 # Syntax:
-#   jack_connect <src_port> <dst_port> 
-#   jack_disconnect <src_port> <dst_port> 
+#   jack_connect <src_port> <dst_port>
+#   jack_disconnect <src_port> <dst_port>
 #   jackd [options] -d backend [backend-parameters]
 #   jackstart [options] -d backend [backend-parameters]
 
@@ -26,64 +26,62 @@
 
 have jack_connect &&
 _jack_lsp_type() {
- jack_lsp -p | grep -B1 $1 | \
-        grep -v 'properties.*,$' | grep -v ^-- \
+	jack_lsp -p | grep -B1 $1 \
+		| grep -v 'properties.*,$' | grep -v ^-- \
 		| sed 's/\([\/ :]\)/\\\1/g'
-		#| sed 's/\([\\: ]\)/\\\1/g'
-		#| sed 's/\(.*\)/"\1"/g'
+#		| sed 's/\([\\: ]\)/\\\1/g'
+#		| sed 's/\(.*\)/"\1"/g'
 }
 
 have jackd &&
 _jackd_driver_help() {
- jackd -d $1 --help 2> /dev/null | grep - | \
-        sed 's/-\(.*\), --\([^\ .]*\) *\(.*\)/-\1 --\2/'
+	jackd -d $1 --help 2> /dev/null | grep - \
+		| sed 's/-\(.*\), --\([^\ .]*\) *\(.*\)/-\1 --\2/'
 }
 
 have jack_connect &&
 _jack_connections() {
-
-        local cur prev output IFS=$'\n'
+	local cur prev output IFS=$'\n'
 
 	COMPREPLY=()
 	cur=${COMP_WORDS[COMP_CWORD]}
 	prev=${COMP_WORDS[COMP_CWORD-1]}
 
-        # check if this is the first argument
+	# check if this is the first argument
 	if [[ "$1" == "$prev" ]]; then
 		COMPREPLY=( $( compgen -W "$(_jack_lsp_type output)" -- $cur ) )
 	else
 		COMPREPLY=( $( compgen -W "$(_jack_lsp_type  input)" -- $cur ) )
-        fi
+	fi
 
 	return 0
-
 }
 
 have jackd &&
 _jackd()
 {
-        local cur prev special
+	local cur prev special
 
-        COMPREPLY=()
-        cur=${COMP_WORDS[COMP_CWORD]}
-        prev=${COMP_WORDS[COMP_CWORD-1]}
+	COMPREPLY=()
+	cur=${COMP_WORDS[COMP_CWORD]}
+	prev=${COMP_WORDS[COMP_CWORD-1]}
 
-        # check if backend was specified
+	# check if backend was specified
 	for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
 		if [[ ${COMP_WORDS[i]} == @(alsa|dummy|oss|coreaudio|portaudio) ]]; then
 			special=${COMP_WORDS[i]}
 		fi
 	done
 
-        # list backends 
-        if [[ "$prev" == -d || "$prev" == --driver ]]; then
-                COMPREPLY=( $( compgen -W 'alsa dummy oss coreaudio portaudio' -- $cur ) )
-        # list backend specific options
-        elif [ -n "$special" ]; then
-                COMPREPLY=( $( compgen -W '`_jackd_driver_help $special` --help' -- $cur ) )
-        # list common options
-        else
-                COMPREPLY=( $( compgen -W '--help -h \
+	# list backends
+	if [[ "$prev" == -d || "$prev" == --driver ]]; then
+		COMPREPLY=( $( compgen -W 'alsa dummy oss coreaudio portaudio' -- $cur ) )
+	# list backend specific options
+	elif [ -n "$special" ]; then
+		COMPREPLY=( $( compgen -W '`_jackd_driver_help $special` --help' -- $cur ) )
+	# list common options
+	else
+		COMPREPLY=( $( compgen -W '--help -h \
 			--driver -d \
 			--realtime -R \
 			--realtime-priority -P \
@@ -94,13 +92,13 @@ _jackd()
 			--port-max -p \
 			--verbose -v \
 			--silent -s \
-			--version -V' -- $cur ) ) 
-        fi
+			--version -V' -- $cur ) )
+	fi
 
-        return 0
+	return 0
 }
 
-[ "$have" ] && complete -F _jack_connections $filenames jack_connect 
-[ "$have" ] && complete -F _jack_connections $filenames jack_disconnect 
+[ "$have" ] && complete -F _jack_connections $filenames jack_connect
+[ "$have" ] && complete -F _jack_connections $filenames jack_disconnect
 [ "$have" ] && complete -F _jackd $filenames jackd
 [ "$have" ] && complete -F _jackd $filenames jackstart
diff --git a/debian/jackd2.postinst b/debian/jackd2.postinst
index 1eb2343..edd1b94 100644
--- a/debian/jackd2.postinst
+++ b/debian/jackd2.postinst
@@ -8,19 +8,19 @@ CONFIG_FILE=/etc/security/limits.d/audio.conf
 # if neither $CONFIG_FILE nor ${CONFIG_FILE}.disabled exists,
 # let's copy it over from /usr/share/
 if [ ! -s ${CONFIG_FILE} -a ! -s ${CONFIG_FILE}.disabled ]; then
-    cp /usr/share/jackd/audio.conf ${CONFIG_FILE}.disabled
+	cp /usr/share/jackd/audio.conf ${CONFIG_FILE}.disabled
 fi
 
 db_get jackd/tweak_rt_limits
 if [ $RET = "true" ]; then
-    if [ -e ${CONFIG_FILE}.disabled ]; then
-        mv ${CONFIG_FILE}.disabled ${CONFIG_FILE} || true
-    fi
+	if [ -e ${CONFIG_FILE}.disabled ]; then
+		mv ${CONFIG_FILE}.disabled ${CONFIG_FILE} || true
+	fi
 else
-    # user doesn't want RT prio
-    if [ -e $CONFIG_FILE ]; then 
-        mv $CONFIG_FILE ${CONFIG_FILE}.disabled || true
-    fi
+	# user doesn't want RT prio
+	if [ -e $CONFIG_FILE ]; then
+		mv $CONFIG_FILE ${CONFIG_FILE}.disabled || true
+	fi
 fi
 
 #DEBHELPER#
diff --git a/debian/jackd2.postrm b/debian/jackd2.postrm
index 4151d94..664426d 100644
--- a/debian/jackd2.postrm
+++ b/debian/jackd2.postrm
@@ -1,25 +1,20 @@
 #!/bin/sh -e
-#
-#
+
 CONFIG_FILE=/etc/security/limits.d/audio.conf
 
-if [ "$1" = "purge" ]
-then
-    for conffile in ${CONFIG_FILE} ${CONFIG_FILE}.disabled
-    do
-        if [ -e ${conffile} ]
-        then
-            rm ${conffile}
-        fi
-    done
+if [ "$1" = "purge" ]; then
+	for conffile in ${CONFIG_FILE} ${CONFIG_FILE}.disabled; do
+		if [ -e ${conffile} ]; then
+			rm ${conffile}
+		fi
+	done
 
-    # if we still have debconf, also remove our entries from the DB
-    if [ -e /usr/share/debconf/confmodule ]
-    then
-        # Source debconf library.
-        . /usr/share/debconf/confmodule
-        db_purge
-    fi
+	# if we still have debconf, also remove our entries from the DB
+	if [ -e /usr/share/debconf/confmodule ]; then
+		# Source debconf library.
+		. /usr/share/debconf/confmodule
+		db_purge
+	fi
 fi
 
 #DEBHELPER#

-- 
jackd2 packaging



More information about the pkg-multimedia-commits mailing list