GETLOCAL="cp -a"
if (rpm --version 2>&1 | grep -q '4.0.[0-2]'); then
- RPM="rpm"
- RPMBUILD="rpm"
+ RPM="rpm"
+ RPMBUILD="rpm"
else
- RPM="rpm"
- RPMBUILD="rpmbuild"
+ RPM="rpm"
+ RPMBUILD="rpmbuild"
fi
POLDEK_INDEX_DIR="`$RPM --eval %_rpmdir`/"
# in command line.
# This one reads global system environment settings:
if [ -f ~/etc/builderrc ]; then
- . ~/etc/builderrc
+ . ~/etc/builderrc
fi
# And this one cascades settings using user personal
# builder settings.
${GETURI2} -O "$target" "$url"
fi
fi
- if ! test -s "$target"; then
- rm -f "$target"
+ if ! test -s "$target"; then
+ rm -f "$target"
if [ `echo $url_attic | grep -E '^(\.|/)'` ]; then
${GETLOCAL} $url_attic $target
else
fi
fi
fi
- if ! test -s "$target"; then
- rm -f "$target"
- FROM_DISTFILES=0
- fi
+ if ! test -s "$target"; then
+ rm -f "$target"
+ FROM_DISTFILES=0
+ fi
elif [ -z "$(src_md5 "$i")" -a "$NOCVS" != "yes" ]; then
# ( echo $i | grep -qvE '(ftp|http|https)://' ); -- if CVS should be used, but URLs preferred
result=1
fi
done
fi
-
+
if [ -z "$NOURLS" ] && [ ! -f "`nourl $i`" -o -n "$UPDATE" ] && [ `echo $i | grep -E 'ftp://|http://|https://'` ]; then
if [ -z "$NOMIRRORS" ]; then
im="`find_mirror "$i"`"
fi
fi
-
fi
srcno=$(src_no $i)
if [ ! -f "`nourl $i`" -a "$FAIL_IF_NO_SOURCES" != "no" ]; then
cd $SOURCE_DIR
for i in $TAG_FILES
do
- # don't tag non cvs files (ie. stored on distfiles)
-# FIXME! file_has_url != file_is_on_distfiles
-# [ "`nourl $i`" != "$i" ] && continue
+ # don't tag files stored on distfiles
+ [ -n "`src_md5 $i`" ] && continue
if [ -f "`nourl $i`" ]; then
if [ "$TAG_VERSION" = "yes" ]; then
cvs $OPTIONS $TAGVER `nourl $i`
fi
;;
"tag" )
+ NOURLS=1
+ NODIST=1
init_builder;
if [ -n "$SPECFILE" ]; then
get_spec;
new_SOURCES=""
for file in $SOURCES
do
- [ "`nourl $file`" != "$file" ] && continue
+ [ -n "`src_md5 $file`" ] && continue
new_SOURCES="$new_SOURCES $file"
done
SOURCES="$new_SOURCES"