Commit 02044f84 authored by Vitaly Lipatov's avatar Vitaly Lipatov

introduce CURRENTBRANCHNAME and use it in helps

parent 8d7e39fd
...@@ -18,7 +18,7 @@ SAVEOPT=$@ ...@@ -18,7 +18,7 @@ SAVEOPT=$@
############################# #############################
Usage="Usage: $name [-t -i -h -r] bin.rpm..." Usage="Usage: $name [-t -i -h -r] [-$CURRENTBRANCHNAME] bin.rpm..."
function mygetopts() function mygetopts()
{ {
name=${0##*/} name=${0##*/}
...@@ -33,6 +33,7 @@ phelp() ...@@ -33,6 +33,7 @@ phelp()
echog " -c - cleanup hasher" echog " -c - cleanup hasher"
echog " -t - use test hasher dir" echog " -t - use test hasher dir"
echog " -r - remote login to hasher" echog " -r - remote login to hasher"
echog " -M?? - branch name"
} }
while getopts :chitr opt; do while getopts :chitr opt; do
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
# rpm- # rpm-
# : # :
# - - # - -
# TODO -M?
# TODO: -c
# load common functions, compatible with local and installed script # load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
...@@ -46,13 +44,13 @@ while getopts :hciprR opt; do ...@@ -46,13 +44,13 @@ while getopts :hciprR opt; do
case $opt in case $opt in
h) phelp; exit 0;; h) phelp; exit 0;;
c) BUILDOPT="c" ;; c) BUILDOPT="c" ;;
i) BUILDOPT="i b" ;; i) BUILDOPT="i b" ;;
p) BUILDOPT="b" ;; p) BUILDOPT="b" ;;
r) BUILDREQ="-bc" ;; r) BUILDREQ="-bc" ;;
R) BUILDREQ="-bi" ;; R) BUILDREQ="-bi" ;;
+?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;; +?) echog "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
# ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;; # ?) echog "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
?) OPTIND=$((OPTIND-1)); break; ?) OPTIND=$((OPTIND-1)); break;
esac esac
done done
......
...@@ -247,7 +247,7 @@ $BUILDCOMMAND $LISTRPMARGS $REMOTEBUILD $DISTRARG $SPECNAME || fatal "Can't buil ...@@ -247,7 +247,7 @@ $BUILDCOMMAND $LISTRPMARGS $REMOTEBUILD $DISTRARG $SPECNAME || fatal "Can't buil
############################# #############################
Usage="Usage: $name [-r -u -U -n -i -m -v] [-M??] spec..." Usage="Usage: $name [-r -u -U -n -i -m -v] [-$CURRENTBRANCHNAME] spec..."
function mygetopts() function mygetopts()
{ {
name=${0##*/} name=${0##*/}
...@@ -257,7 +257,7 @@ phelp() ...@@ -257,7 +257,7 @@ phelp()
{ {
echog "$Descr" echog "$Descr"
echog "$Usage" echog "$Usage"
echo "Use rpmbph -M40 for backport to ALT 4.0 and so on" echo "Use rpmbph -$CURRENTBRANCHNAME for backport to ALT $CURRENTBRANCHNAME and so on"
echog "Options:" echog "Options:"
echog " -r - remote build" echog " -r - remote build"
# echog " -m - send result via e-mail" # echog " -m - send result via e-mail"
......
...@@ -40,6 +40,8 @@ REMOTERPMDIR= ...@@ -40,6 +40,8 @@ REMOTERPMDIR=
HASHERDIR="$HOME/hasher" HASHERDIR="$HOME/hasher"
HASHER_NOCHECK=nvr,gpg,packager,buildtime HASHER_NOCHECK=nvr,gpg,packager,buildtime
HASHERARG="--eager-cleanup" HASHERARG="--eager-cleanup"
# for use in help as example branch/distro name
CURRENTBRANCHNAME="M51"
[ -n "$DEBUG" ] && HASHERARG="-v $HASHERARG" [ -n "$DEBUG" ] && HASHERARG="-v $HASHERARG"
RSYNCSISYPHUS=rsync.altlinux.org::ALTLinux/Sisyphus RSYNCSISYPHUS=rsync.altlinux.org::ALTLinux/Sisyphus
......
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