[vlma-devel] commit: vlmad: Some cleanup. (Adrien Grand )
git version control
git at videolan.org
Wed Jul 9 00:25:41 CEST 2008
vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Tue Jul 8 16:04:46 2008 +0200| [70bb43db994d9d2a8f10f5476596cf4f5df237bf]
vlmad: Some cleanup.
> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=70bb43db994d9d2a8f10f5476596cf4f5df237bf
---
vlma-distribution/src/bin/vlmad | 25 +++++++++++++++----------
1 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/vlma-distribution/src/bin/vlmad b/vlma-distribution/src/bin/vlmad
index 9e55e23..513decf 100644
--- a/vlma-distribution/src/bin/vlmad
+++ b/vlma-distribution/src/bin/vlmad
@@ -1,20 +1,25 @@
#!/bin/sh
+set -e
+
function usage() {
- echo "Usage: vlmad (start|stop|reload)"
+ echo "Usage: vlmad [start|stop|reload|help]"
}
-
# Parse command line
-COMMAND=$1
-if [ -z "$COMMAND" -o "$COMMAND" == "start" ]
+COMMAND="$1"
+if [ "$COMMAND" = "start" ]
then
echo "[INFO] Starting VLMad."
-elif [ "$COMMAND" == "stop" ]
+elif [ "$COMMAND" = "stop" ]
then
echo "[INFO] Stopping VLMad."
-elif [ "$COMMAND" == "reload" ]
- then
+elif [ "$COMMAND" = "reload" ]
+then
echo "[INFO] Reloading VLMad."
+elif [ "$COMMAND" = "help" ]
+then
+ usage
+ exit 0
else
echo "[ERROR] Command not found."
usage
@@ -60,12 +65,12 @@ echo "[INFO] Using VLMA_LOGS: $VLMA_LOGS"
echo "[INFO] Using VLMA_WORK: $VLMA_WORK"
# Set classpath
-for jar in $(/bin/ls -1 $VLMA_LIBS)
+for jar in $VLMA_LIBS/*
do
- CLASSPATH="$CLASSPATH:$VLMA_LIBS/$jar"
+ CLASSPATH="$CLASSPATH:$jar"
done
# If classpath was not defined earlier
-CLASSPATH=$(echo $CLASSPATH | /bin/sed -e "s/^://")
+CLASSPATH=$(echo $CLASSPATH | sed -e "s/^://")
# Set VLMA_OPTS
VLMA_OPTS="$VLMA_OPTS\
More information about the vlma-devel
mailing list