Commit 797cad43 authored by Vitaly Lipatov's avatar Vitaly Lipatov

loginhsh: fix params with white spaces handling

parent 0da586dc
...@@ -32,7 +32,7 @@ phelp() ...@@ -32,7 +32,7 @@ phelp()
echog " -b REPONAME binary repository name (4.1, p5, t6 and so on)" echog " -b REPONAME binary repository name (4.1, p5, t6 and so on)"
echog " -c cleanup hasher" echog " -c cleanup hasher"
echog " -q quiet mode (don't run anything)" echog " -q quiet mode (don't run anything)"
echog " -r run command" echog " -r COMMAND run command"
echog " -o log in as root user" echog " -o log in as root user"
echog " -v verbose" echog " -v verbose"
echog " -X|-Y allow run X program (set DISPLAY and install xauth)" echog " -X|-Y allow run X program (set DISPLAY and install xauth)"
...@@ -53,9 +53,9 @@ while getopts :chitodvqr:b:p:xXY opt; do ...@@ -53,9 +53,9 @@ while getopts :chitodvqr:b:p:xXY opt; do
c) CLEANUP=1 ;; c) CLEANUP=1 ;;
d) PRINTHASHERDIR=1 ;; d) PRINTHASHERDIR=1 ;;
q) QUIETMODE=1 ;; q) QUIETMODE=1 ;;
b) BINARYREPONAME=$OPTARG ;; b) BINARYREPONAME="$OPTARG" ;;
r) RUNCOMMAND=$OPTARG ;; r) RUNCOMMAND="$OPTARG" ;;
p) HASHERPOSTFIX=$OPTARG ;; p) HASHERPOSTFIX="$OPTARG" ;;
X) ALLOWX=-X ;; X) ALLOWX=-X ;;
Y) ALLOWX=-Y ;; Y) ALLOWX=-Y ;;
x) ALLOWX=-Y ;; x) ALLOWX=-Y ;;
...@@ -72,12 +72,12 @@ if [ $# -gt 0 ]; then ...@@ -72,12 +72,12 @@ if [ $# -gt 0 ]; then
shift $((OPTIND - 1)) shift $((OPTIND - 1))
fi fi
LISTRPMARGS=$@ LISTNAMES="$@"
} }
parse_cmd_pre "$@" -- #parse_cmd_pre "$@" --
mygetopts $LISTARGS mygetopts "$@"
# see functions/alt:set_binaryrepo() for BINARYREPONAME # see functions/alt:set_binaryrepo() for BINARYREPONAME
set_binaryrepo $MENV set_binaryrepo $MENV
...@@ -125,13 +125,12 @@ if [ -n "$ALLOWX" ] ; then ...@@ -125,13 +125,12 @@ if [ -n "$ALLOWX" ] ; then
fi fi
if [ -n "$QUIETMODE" ] ; then if [ -n "$QUIETMODE" ] ; then
docmd $HSH-install $HASHERDIR --wait-lock $UTILPKG $LISTRPMARGS $LISTNAMES || fatal "Error with install" docmd $HSH-install $HASHERDIR --wait-lock $UTILPKG $LISTNAMES || fatal "Error with install"
echog "Exiting (quiet mode)..." echog "Exiting (quiet mode)..."
exit exit
fi fi
echog "Prepare hasher in $HASHERDIR ..." echog "Prepare hasher in $HASHERDIR ..."
# there is package names in LISTRPMARGS
UTILPKG="mc eepm" UTILPKG="mc eepm"
# GNOME program needs dbus-tools-gui # GNOME program needs dbus-tools-gui
...@@ -147,7 +146,7 @@ else ...@@ -147,7 +146,7 @@ else
UTILPKG="$UTILPKG etersoft-build-utils" UTILPKG="$UTILPKG etersoft-build-utils"
fi fi
docmd $HSH-install $HASHERDIR --wait-lock $UTILPKG $LISTRPMARGS $LISTNAMES || fatal "Error with install" docmd $HSH-install $HASHERDIR --wait-lock $UTILPKG $LISTNAMES || fatal "Error with install"
if [ -n "$RUNCOMMAND" ] ; then if [ -n "$RUNCOMMAND" ] ; then
docmd $HSH-run $HASHERDIR $SHELLHASHERARG $ROOTER --wait-lock -- $RUNCOMMAND docmd $HSH-run $HASHERDIR $SHELLHASHERARG $ROOTER --wait-lock -- $RUNCOMMAND
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment