Commit 32ac9c92 authored by Vitaly Lipatov's avatar Vitaly Lipatov

fix LISTNAMES/LISTARGS (remove first space), fix checking for file in rpmgs

parent 1c39b717
......@@ -179,7 +179,7 @@ if [ -n "$LISTARGS" ] ; then
if [ -z "${LISTARGS/*spec/}" ] ; then
fatal "run with incorrect filename $LISTARGS"
fi
if [ -f "$LISTNAMES" ] ; then
if [ ! -f "$LISTNAMES" ] ; then
fatal "set version permitted only for one file"
fi
if [ "${LISTARGS/ /}" != "$LISTARGS" ] ; then
......
......@@ -124,8 +124,8 @@ fi
MENV=SS
set_target_type $(basename `pwd`)
LISTNAMES=""
LISTARGS=""
LISTNAMES=
LISTARGS=
OPTINDEX=1
for i in "$@"
do
......@@ -136,6 +136,9 @@ do
set_target_type ${i/-/} || LISTARGS="$LISTARGS $i"
fi
done
# remove extra space before list
LISTNAMES=$(echo "$LISTNAMES" | sed -e "s|^ ||")
LISTARGS=$(echo "$LISTARGS" | sed -e "s|^ ||")
# parse MENV
detect_target_env
[ -n "$VERBOSE" ] && echo "LISTNAMES=$LISTNAMES LISTARGS=$LISTARGS" || :
......
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