Renamed all command line options in long format that is more readable.

This commit is contained in:
Louwrentius 2009-03-01 23:25:16 +00:00
parent 1bdfe61490
commit 0a35341033
1 changed files with 120 additions and 125 deletions

39
ppss.sh
View File

@ -250,7 +250,7 @@ add_var_to_config () {
while [ $# -gt 0 ] while [ $# -gt 0 ]
do do
case $1 in case $1 in
-config ) --config )
CONFIG="$2" CONFIG="$2"
if [ "$MODE" == "config" ] if [ "$MODE" == "config" ]
@ -282,27 +282,22 @@ do
shift 2 shift 2
;; ;;
-n ) --nodes )
NODES_FILE="$2" NODES_FILE="$2"
shift 2 shift 2
;; ;;
-f ) --sourcefile )
INPUT_FILE="$2" INPUT_FILE="$2"
add_var_to_config INPUT_FILE "$INPUT_FILE" add_var_to_config INPUT_FILE "$INPUT_FILE"
shift 2 shift 2
;; ;;
-d ) --sourcedir )
SRC_DIR="$2" SRC_DIR="$2"
add_var_to_config SRC_DIR "$SRC_DIR" add_var_to_config SRC_DIR "$SRC_DIR"
shift 2 shift 2
;; ;;
-D ) --command )
DAEMON=1
add_var_to_config DAEMON "$DAEMON"
shift 2
;;
-c )
COMMAND=$2 COMMAND=$2
if [ "$MODE" == "config" ] if [ "$MODE" == "config" ]
then then
@ -312,20 +307,20 @@ do
shift 2 shift 2
;; ;;
-h ) --help )
showusage showusage
exit 1;; exit 1;;
-j ) --hyperthreading )
HYPERTHREADING=yes HYPERTHREADING=yes
add_var_to_config HYPERTHREADING "yes" add_var_to_config HYPERTHREADING "yes"
shift 1 shift 1
;; ;;
-l ) --log )
LOGFILE="$2" LOGFILE="$2"
add_var_to_config LOGFILE "$LOGFILE" add_var_to_config LOGFILE "$LOGFILE"
shift 2 shift 2
;; ;;
-k ) --key )
SSH_KEY="$2" SSH_KEY="$2"
add_var_to_config SSH_KEY "$SSH_KEY" add_var_to_config SSH_KEY "$SSH_KEY"
if [ ! -z "$SSH_KEY" ] if [ ! -z "$SSH_KEY" ]
@ -334,17 +329,17 @@ do
fi fi
shift 2 shift 2
;; ;;
-b ) --no-secure-copy )
SECURE_COPY=0 SECURE_COPY=0
add_var_to_config SECURE_COPY "$SECURE_COPY" add_var_to_config SECURE_COPY "$SECURE_COPY"
shift 1 shift 1
;; ;;
-o ) --outputdir )
REMOTE_OUTPUT_DIR="$2" REMOTE_OUTPUT_DIR="$2"
add_var_to_config REMOTE_OUTPUT_DIR "$REMOTE_OUTPUT_DIR" add_var_to_config REMOTE_OUTPUT_DIR "$REMOTE_OUTPUT_DIR"
shift 2 shift 2
;; ;;
-p ) --processes )
TMP="$2" TMP="$2"
if [ ! -z "$TMP" ] if [ ! -z "$TMP" ]
then then
@ -353,28 +348,28 @@ do
shift 2 shift 2
fi fi
;; ;;
-s ) --server )
SSH_SERVER="$2" SSH_SERVER="$2"
add_var_to_config SSH_SERVER "$SSH_SERVER" add_var_to_config SSH_SERVER "$SSH_SERVER"
shift 2 shift 2
;; ;;
-S ) --script )
SCRIPT="$2" SCRIPT="$2"
add_var_to_config SCRIPT "$SCRIPT" add_var_to_config SCRIPT "$SCRIPT"
shift 2 shift 2
;; ;;
-t ) --transfer )
TRANSFER_TO_SLAVE="1" TRANSFER_TO_SLAVE="1"
add_var_to_config TRANSFER_TO_SLAVE "$TRANSFER_TO_SLAVE" add_var_to_config TRANSFER_TO_SLAVE "$TRANSFER_TO_SLAVE"
shift 1 shift 1
;; ;;
-u ) --user )
USER="$2" USER="$2"
add_var_to_config USER "$USER" add_var_to_config USER "$USER"
shift 2 shift 2
;; ;;
-v ) --version )
echo "" echo ""
echo "$SCRIPT_NAME version $SCRIPT_VERSION" echo "$SCRIPT_NAME version $SCRIPT_VERSION"
echo "" echo ""