[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kmix] apps: Make kmixremote sh compatible.
From: Christian Esken <esken () kde ! org>
Date: 2015-01-06 22:34:50
Message-ID: E1Y8ciA-0004l0-1b () scm ! kde ! org
[Download RAW message or body]
Git commit bc607e91429c9d49b3f2c52648f869c89ef81387 by Christian Esken.
Committed on 06/01/2015 at 22:34.
Pushed by esken into branch 'master'.
Make kmixremote sh compatible.
BUGS: 341640
M +9 -8 apps/kmixremote
http://commits.kde.org/kmix/bc607e91429c9d49b3f2c52648f869c89ef81387
diff --git a/apps/kmixremote b/apps/kmixremote
index 2f21209..a9468c5 100755
--- a/apps/kmixremote
+++ b/apps/kmixremote
@@ -7,7 +7,7 @@
# Mute
#################################################################################
-function usage
+usage()
{
echo "Usage:"
echo "List mixers # $0 list"
@@ -15,19 +15,19 @@ function usage
echo "Get Volume # $0 get [--master | <mixer> <control>]"
echo "Set Volume # $0 set [--master | <mixer> <control>] <0..100>"
echo "Mute/Unmute # $0 mute [--master | <mixer> <control>] true|false"
- echo
+ echo
}
-function exit_with_error
+exit_with_error()
{
echo "Error: $1"
- echo
+ echo
usage
exit 1
}
# Prints the mixer DBUS ID's on the console. leaving out the "/Mixers/" prefix
-function listMixers
+listMixers()
{
qdbus org.kde.kmix /Mixers org.freedesktop.DBus.Properties.Get org.kde.KMix.MixSet mixers | cut -f3 -d/
errorCode=$?
@@ -37,7 +37,7 @@ function listMixers
}
# Prints the mixer control DBUS ID's of the given mixer on the console. leaving out the "/Mixers/" prefix
-function listControls
+listControls()
{
qdbus org.kde.kmix $1 org.freedesktop.DBus.Properties.Get org.kde.KMix.Mixer controls | cut -f4 -d/
errorCode=$?
@@ -55,10 +55,11 @@ fi
# Read args
while true; do
arg=$1
- shift
if test -z "$arg"; then
break
- elif test "x--master" = "x$arg"; then
+ fi
+ shift
+ if test "x--master" = "x$arg"; then
mixer=`qdbus org.kde.kmix /Mixers org.kde.KMix.MixSet.currentMasterMixer`
control=`qdbus org.kde.kmix /Mixers org.kde.KMix.MixSet.currentMasterControl`
elif test "x--help" = "x$arg" -o "x-h" = "x$arg"; then
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic