[irstlm] 65/146: Made irstlm script more portable.
Giulio Paci
giuliopaci-guest at moszumanska.debian.org
Tue May 17 07:37:08 UTC 2016
This is an automated email from the git hooks/post-receive script.
giuliopaci-guest pushed a commit to branch master
in repository irstlm.
commit 9531bd19bd5de8521b05036779cc68d48abecf00
Author: Giulio Paci <giuliopaci at gmail.com>
Date: Thu Jan 10 02:10:08 2013 +0100
Made irstlm script more portable.
---
debian/scripts/irstlm | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/debian/scripts/irstlm b/debian/scripts/irstlm
index 0111b5e..0d14db4 100755
--- a/debian/scripts/irstlm
+++ b/debian/scripts/irstlm
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# This software is released according to the Expat license below.
#
@@ -32,7 +32,7 @@ export IRSTLM=/usr/lib/irstlm
IRSTLM_PATH=/usr/lib/irstlm/bin
PATH=$IRSTLM_PATH:$PATH
-function get_commands()
+get_commands()
{
ls "$IRSTLM_PATH" | while read cmnd;
do
@@ -44,10 +44,10 @@ function get_commands()
echo "help - print help about commands"
}
-function get_help_usage()
+get_help_usage()
{
local cmnd="$1"
- if [[ "$cmnd" == "" ]]
+ if test x"$cmnd" = x""
then
cat<<EOF
@@ -81,10 +81,10 @@ EOF
fi
}
-function get_usage()
+get_usage()
{
local cmnd="$1"
- if [[ "$cmnd" == "" ]]
+ if test x"$cmnd" = x""
then
cat<<EOF
@@ -107,13 +107,13 @@ EOF
fi
}
-if [[ "$1" == "" ]]
+if test x"$1" = x""
then
get_usage
exit
fi
shift
-if [[ "$COMMAND" == "help" ]]
+if test x"$COMMAND" = x"help"
then
get_help_usage "$1"
exit 0;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/irstlm.git
More information about the debian-science-commits
mailing list