]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
- kill some long if-branches
authorElan Ruusamäe <glen@pld-linux.org>
Sat, 4 Dec 2010 19:22:34 +0000 (19:22 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    builder.sh -> 1.638

builder.sh

index 3f917fed06070454d8c5ca30abc2322ae0225fdb..9fb659be781b0f17b678eae407d65fef1e7b5843 100644 (file)
@@ -2436,48 +2436,52 @@ update_shell_title "$COMMAND"
 case "$COMMAND" in
        "show_bconds")
                init_builder
-               if [ -n "$SPECFILE" ]; then
-                       get_spec > /dev/null
-                       parse_spec
-                       set_bconds_values
-                       display_bconds
+               if [ -z "$SPECFILE" ]; then
+                       Exit_error err_no_spec_in_cmdl
                fi
+               get_spec > /dev/null
+               parse_spec
+               set_bconds_values
+               display_bconds
                ;;
        "show_bcond_args")
                init_builder
-               if [ -n "$SPECFILE" ]; then
-                       get_spec > /dev/null
-                       parse_spec
-                       set_bconds_values
-                       echo "$BCOND"
+               if [ -z "$SPECFILE" ]; then
+                       Exit_error err_no_spec_in_cmdl
                fi
+               get_spec > /dev/null
+               parse_spec
+               set_bconds_values
+               echo "$BCOND"
                ;;
        "show_avail_bconds")
                init_builder
-               if [ -n "$SPECFILE" ]; then
-                       get_spec > /dev/null
-                       parse_spec
-                       local bcond_avail=$(find_spec_bcond $SPECFILE)
-                       local opt bcond bconds
-                       for opt in $bcond_avail; do
-                               case "$opt" in
-                               without_*)
-                                       bcond=${opt#without_}
-                                       bconds="$bconds $bcond"
-                                       ;;
-                               with_*)
-                                       bcond=${opt#with_}
-                                       bconds="$bconds $bcond"
-                                       ;;
-                               *)
-                                       echo >&2 "ERROR: unexpected '$opt' in show_avail_bconds"
-                                       exit 1
-                                       ;;
-                               esac
-                       done
-                       echo $bconds
+               if [ -z "$SPECFILE" ]; then
+                       Exit_error err_no_spec_in_cmdl
                fi
 
+               get_spec > /dev/null
+               parse_spec
+               local bcond_avail=$(find_spec_bcond $SPECFILE)
+               local opt bcond bconds
+               for opt in $bcond_avail; do
+                       case "$opt" in
+                       without_*)
+                               bcond=${opt#without_}
+                               bconds="$bconds $bcond"
+                               ;;
+                       with_*)
+                               bcond=${opt#with_}
+                               bconds="$bconds $bcond"
+                               ;;
+                       *)
+                               echo >&2 "ERROR: unexpected '$opt' in show_avail_bconds"
+                               exit 1
+                               ;;
+                       esac
+               done
+               echo $bconds
+
                ;;
        "build" | "build-binary" | "build-source" | "build-prep" | "build-build" | "build-install" | "build-list")
                init_builder
This page took 0.055698 seconds and 4 git commands to generate.