remove unneeded break argument from option parsing

Some scripts are using `break 2` to break out of the option parsing
loop.

Since a single `break` is sufficient in these cases, remove the extra
argument.

Signed-off-by: Rafael Ascensão <rafa.almas@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Rafael Ascensão 2018-05-01 17:54:04 +01:00 committed by Allan McRae
parent 77986af9b7
commit fa8b99189e
5 changed files with 5 additions and 5 deletions

View file

@ -48,7 +48,7 @@ download_sources() {
get_vcs=0 get_vcs=0
;; ;;
*) *)
break 2 break
;; ;;
esac esac
shift shift

View file

@ -1277,7 +1277,7 @@ while true; do
-h|--help) usage; exit $E_OK ;; -h|--help) usage; exit $E_OK ;;
-V|--version) version; exit $E_OK ;; -V|--version) version; exit $E_OK ;;
--) OPT_IND=0; shift; break 2;; --) OPT_IND=0; shift; break ;;
esac esac
shift shift
done done

View file

@ -103,7 +103,7 @@ while true; do
-h|--help) usage; exit 0 ;; -h|--help) usage; exit 0 ;;
--nocolor) USE_COLOR='n' ;; --nocolor) USE_COLOR='n' ;;
-V|--version) version; exit 0 ;; -V|--version) version; exit 0 ;;
-- ) shift; break 2 ;; --) shift; break ;;
esac esac
shift shift
done done

View file

@ -557,7 +557,7 @@ while (( $# )); do
-h|--help) usage; exit 0 ;; -h|--help) usage; exit 0 ;;
-V|--version) version; exit 0 ;; -V|--version) version; exit 0 ;;
--) shift; break 2 ;; --) shift; break ;;
esac esac
shift shift
done done

View file

@ -202,7 +202,7 @@ while :; do
shift ;; shift ;;
--) --)
shift shift
break 2 ;; break ;;
esac esac
shift shift
done done