audio/pulseaudio: Make bash completion script posix friendly.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Christoph Willing 2015-09-14 01:27:54 +07:00 committed by Willy Sudiarto Raharjo
parent a2fa8c03e7
commit abbd682493
4 changed files with 99 additions and 4 deletions

View File

@ -0,0 +1,91 @@
--- shell-completion/bash/pulseaudio.orig 2015-02-13 00:10:35.000000000 +1000
+++ shell-completion/bash/pulseaudio 2015-09-12 11:09:36.948222926 +1000
@@ -1,39 +1,45 @@
#!/bin/bash
__cards () {
+ (pactl list cards short 2> /dev/null) |\
while IFS=$'\t' read idx name _; do
printf "%s %s\n" "$idx" "$name"
- done < <(pactl list cards short 2> /dev/null)
+ done
}
__sinks () {
+ (pactl list sinks short 2> /dev/null) |\
while IFS=$'\t' read _ name _ _ _; do
printf "%s\n" "$name"
- done < <(pactl list sinks short 2> /dev/null)
+ done
}
__sinks_idx () {
+ (pactl list sinks short 2> /dev/null) |\
while IFS=$'\t' read idx _ _ _ _; do
printf "%s\n" "$idx"
- done < <(pactl list sinks short 2> /dev/null)
+ done
}
__sources () {
+ (pactl list sources short 2> /dev/null) |\
while IFS=$'\t' read _ name _ _ _; do
printf "%s\n" "$name"
- done < <(pactl list sources short 2> /dev/null)
+ done
}
__sink_inputs () {
+ (pactl list sink-inputs short 2> /dev/null) |\
while IFS=$'\t' read idx _ _ _ _; do
printf "%s\n" "$idx"
- done < <(pactl list sink-inputs short 2> /dev/null)
+ done
}
__source_outputs () {
+ (pactl list source-outputs short 2> /dev/null) |\
while IFS=$'\t' read idx _ _ _ _; do
printf "%s\n" "$idx"
- done < <(pactl list source-outputs short 2> /dev/null)
+ done
}
__ports () {
@@ -77,28 +83,32 @@
}
__all_modules () {
+ (pulseaudio --dump-modules 2> /dev/null) |\
while read name; do
name=${name%% *}
printf "%s\n" "$name"
- done < <(pulseaudio --dump-modules 2> /dev/null)
+ done
}
__loaded_modules () {
+ (pactl list modules short 2> /dev/null) |\
while IFS=$'\t' read idx name _; do
printf "%s %s\n" "$idx" "$name"
- done < <(pactl list modules short 2> /dev/null)
+ done
}
__resample_methods () {
+ (pulseaudio --dump-resample-methods 2> /dev/null) |\
while read name; do
printf "%s\n" "$name"
- done < <(pulseaudio --dump-resample-methods 2> /dev/null)
+ done
}
_pacat_file_formats () {
+ (pacat --list-file-formats 2> /dev/null) |\
while IFS=$'\t' read name _; do
printf "%s\n" "$name"
- done < <(pacat --list-file-formats 2> /dev/null)
+ done
}
in_array() {

View File

@ -2,7 +2,10 @@ pulseaudio is a networked sound server for Unix-like operating systems
and Microsoft Windows. It is intended to be an improved drop-in replacement
for the Enlightened Sound Daemon (ESOUND).
Optional deps: jack-audio-connection-kit, avahi, lirc, libasyncns, orc
Optional deps: sbc, jack-audio-connection-kit, avahi, lirc, libasyncns, orc
Bluetooth support requires the optional sbc package (in addition to the
standard bluez package).
USAGE:
In almost all cases, pulseaudio should be run as a normal user daemon

View File

@ -3,11 +3,11 @@
# Slackware build script for pulseaudio
# Written by crocket (crockabiscuit@gmail.com)
# Maintained by Christoph Willing <chris.willing@iinet.net.au>
# Maintained by Christoph Willing <chris.willing@linux.com>
PRGNAM=pulseaudio
VERSION=${VERSION:-6.0}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -46,6 +46,7 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
patch -p0 < $CWD/020_no-parallel-make.diff
patch -p0 < $CWD/030_posix-completion.diff
sed -i -e '/@PA_BINARY@/ imkdir -p \$HOME/.config/pulse' src/daemon/start-pulseaudio-x11.in
echo "X-MATE-Autostart-Phase=Initialization" >>src/daemon/pulseaudio.desktop.in

View File

@ -7,4 +7,4 @@ DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="json-c speex"
MAINTAINER="Christoph Willing"
EMAIL="chris.willing@iinet.net.au"
EMAIL="chris.willing@linux.com"