blob: 008d0c5744ab8a8e5e5dcd82525ed380f024739d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/bash
# Use -gt 1 to consume two arguments per pass in the loop (e.g. each
# argument has a corresponding value to go with it).
# Use -gt 0 to consume one or more arguments per pass in the loop (e.g.
# some arguments don't have a corresponding value to go with it such
# as in the --default example).
# note: if this is set to -gt 0 the /etc/hosts part is not recognized ( may be a bug )
while [[ $# -gt 1 ]]
do
key="$1"
case $key in
-s|--server)
SERVER="$2"
shift # past argument
;;
esac
shift # past argument or value
done
if [ -z "${SERVER}" ]; then
SERVER="Cities1"
fi
echo SERVER = "${SERVER}"
javaws /opt/xplorers/xplorers${SERVER}.jnlp
|