Commit 8ef0477a authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmcs: add support for spec filename autodetection

rpmgp: run rpmcs after spec/srpm -> git migrate
parent 813a9a61
......@@ -80,14 +80,21 @@ toalt_grprepl()
return 1
}
# If run without params, try autodetect spec
if [ -z "$1" ] ; then
LISTNAMES=$(get_gear_spec)
[ -n "$LISTNAMES" ] && echo "Using autodetected spec $LISTNAMES..."
else
parse_cmd_pre "$@"
fi
parse_cmd_pre "$@"
if [ "$1" = "-h" ]; then
echog "rpmcs spec - cleanup spec (like cleanup_spec command), adapted to ALT"
exit 0
fi
for i in $LISTNAMES
do
if [ -z ${i/*rpm/} ] ; then
......
......@@ -301,6 +301,7 @@ if [ -n "$MIGRATEGIRAR" ] ; then
gear-srpmimport $PKGNAME || fatal "can't import srpm $PKGNAME"
# remove src.rpm only if it was generated from spec
[ -z ${INFILE/*rpm/} ] || rm -vf $PKGNAME
rpmcs
done
exit 0
fi
......
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