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