Commit 15c6a127 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmpub: add set spec name as option

parent ee479b04
......@@ -15,17 +15,12 @@ load_mod spec rpm etersoft
if [ "$1" = "-h" ]; then
echog "rpmpub - Etersoft specific script for publish gear repo to target ftp dir"
echog "Usage: rpmpub [-r VERSION ] [TARGET]"
echog "Usage: rpmpub [-r PROJECTVERSION ] [SPEC] [TARGETDIR]"
echog "You can set default target dir in UPLOADDIR variable in config file"
exit 0
fi
SPECNAME=$(basename $(pwd)).spec
if [ ! -r $SPECNAME ] ; then
fatal "Spec $SPECNAME does not found in the current dir"
fi
# publish to unstable by default
ALPHA=unstable
......@@ -34,6 +29,17 @@ if [ "$1" = "-r" ] ; then
shift 2
fi
if [ -n "${1/*.spec/}" ] ; then
SPECNAME=$(basename $(pwd)).spec
else
SPECNAME=$1
shift
fi
if [ ! -r $SPECNAME ] ; then
fatal "Spec $SPECNAME does not found in the current dir"
fi
#ETERDESTSRPM=/var/ftp/pub/Etersoft/CIFS@Etersoft/$VERSION/sources
ETERDESTSRPM=$1
if [ -z "$ETERDESTSRPM" ] ; then
......
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