Commit 677ea69a authored by Vitaly Lipatov's avatar Vitaly Lipatov

add -l option for lazy-cleanup after build

parent 4478635e
......@@ -11,7 +11,7 @@
load_mod hasher
#############################
Usage="Usage: $name [-m -s -u -i -c] src.rpm..."
Usage="Usage: $name [-m -s -u -i -c -l] src.rpm..."
function mygetopts()
{
name=${0##*/}
......@@ -24,13 +24,16 @@ phelp()
echog "Options:"
echog " -i - install built packages in test hasher"
echog " -c - build without stuff (previous built packages)"
echog " -l - lazy cleanup (before build, not after)"
}
while getopts :hmic opt; do
while getopts :hmicl opt; do
case $opt in
h) phelp; exit 0;;
i) TESTINSTALL=1;;
c) HASHERARG="--without-stuff $HASHERARG";;
l) HASHERARG="$HASHERARG --lazy-cleanup";;
c) HASHERARG="$HASHERARG --without-stuff";;
+?) 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;;
?) OPTIND=$((OPTIND-1)); break;
......
......@@ -41,12 +41,13 @@ phelp()
echog "$Descr"
echog "$Usage"
echog "Options:"
echog " -s - sign package(s) and move it to upload dir"
echog " -s - sign package(s) and move it to upload dir (ETERDESTSRPM)"
echog " -c - only sign package(s) with checking"
echog " -u - sign package(s), upload it and run build"
echog " -a TASK - sign package(s), update it and add to task TASK"
# echog " -U - sign package(s) and upload it to Incoming (updates)"
# echog " -d - remove package(s) from SRPMS and Incoming"
echog " -l - lazy cleanup (before build, not after)"
echog " -n - do not check with sisyphus_check before upload"
echog " -o - create nosrc.rpm package"
echog " -z - create src.rpm with compatible gzip compression"
......
......@@ -33,19 +33,18 @@ phelp()
echog "Options:"
echog " -r - remote build"
echog " -t - make temporary commit before build (rpmbb like behavior)"
echog " -u/-U - sign and upload after build"
echog " -s - sign and and copy to upload after build"
echog " -u - sign and upload after build"
echog " -s - sign and and copy to upload dir (ETERDESTSRPM) after build"
echog " -i - install built packages in test hasher"
echog " -l - lazy cleanup (before build, not after)"
echog " -c - build without stuff (previous built packages)"
}
while getopts :hrusimt opt; do
while getopts :hrulsimt opt; do
case $opt in
h) phelp; exit 0;;
r) REMOTEBUILD=1 ;;
t) COMMIT=--commit ;;
# u) UPLOADNOW="-u" ;;
# s) UPLOADNOW="-s" ;;
t) COMMIT="--commit" ;;
+?) 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;;
?) OPTIND=$((OPTIND-1)); break;
......@@ -70,13 +69,15 @@ fi
parse_cmd_pre "$@"
mygetopts $LISTARGS
[ -n "$LISTNAMES" ] || fatal "Run with exists specs as arg"
# TODO: skip for prev. packed src.rpm
# If fail, we already has correct changelog
add_changelog_helper "- new version" $LISTNAMES
# We do not not pass args for myhsh here...
# FIXME:
pack_src_rpm $COMMIT $(echo $LISTRPMARGS | sed -e "s|-[suUic]||g")
pack_src_rpm $COMMIT $(echo $LISTRPMARGS | sed -e "s|-[suUicl]||g")
# TODO: skip for prev. packed src.rpm
set_specdir $LISTNAMES
......
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