Commit b8520a79 authored by Vitaly Lipatov's avatar Vitaly Lipatov

introduce prepare_rpmdir, use in for create RPMDIR

parent efee2d2f
......@@ -72,10 +72,7 @@ LISTRPMARGS=$@
parse_cmd_pre_spec "$@"
mygetopts $LISTARGS
mkdir -p "$LOGDIR"
mkdir -p "$RPMTOPDIR/RPMS"
test -L "$RPMTOPDIR/tmp" || ln -s $RPMTMPDIR $RPMTOPDIR/tmp
prepare_rpmdir
test -z "$LISTNAMES" && fatal "Please run with spec(s) name"
test -n "$LISTRPMARGS" && echog "Run $RPMBUILD with options: '$LISTRPMARGS'"
......
......@@ -218,7 +218,10 @@ if [ "$PKGVENDOR" != "alt" ] ; then
# Due possible using %release in Source: and Patch: names
subst "s|^\(Source.*\)%release|\1$RELEASE|g" $SPECNAME
subst "s|^\(Patch.*\)%release|\1$RELEASE|g" $SPECNAME
subst "s|^%setup|%setup -q|g" $SPECNAME
# obsoletes since Slackware/13 (rpm 4.10)
subst "s|^BuildPreReq:|BuildRequires:|g" $SPECNAME
fi
# Auto*=yes,nomingw32 works only since ALT 4.1
......
......@@ -194,6 +194,8 @@ parse_cmd_pre_spec "$@"
# quotes brokes option handling
mygetopts $LISTARGS
prepare_rpmdir
#############################
LISTBUILT=""
CURDIR=`pwd`
......@@ -332,8 +334,6 @@ fi
cat $RPMDIR/uploaded.log.tmp | grep task | head -n2 | tail -n1 >> $RPMDIR/uploaded.log
for i in $LISTBUILT ; do
# FIXME: more general way
mkdir -p $LOGDIR
LOGFILE="$LOGDIR/`basename $i .src.rpm`$MENVARG.log"
echo >>$LOGFILE
date >>$LOGFILE
......
......@@ -96,6 +96,15 @@ assert_var()
done
}
prepare_rpmdir()
{
assert_var RPMTOPDIR LOGDIR
mkdir -p $(realpath $RPMDIR)
mkdir -p $(realpath $RPMTOPDIR)
mkdir -p "$LOGDIR"
mkdir -p "$RPMTOPDIR/RPMS"
test -L "$RPMTOPDIR/tmp" || ln -s $RPMTMPDIR $RPMTOPDIR/tmp
}
get_root_git_dir()
{
......
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