X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fvupdateworld;h=ebc5edf02b981e0254a1e7a336b75781942d07e1;hb=54edc50b584ade4f323c16bec6ef6320f129e531;hp=ee5f202d3acf7dc66c41c1c48bbcc284789f33b1;hpb=c137f8fcf55c0ccdb7bdb078ac10dc34240bab23;p=util-vserver.git diff --git a/scripts/vupdateworld b/scripts/vupdateworld index ee5f202..ebc5edf 100755 --- a/scripts/vupdateworld +++ b/scripts/vupdateworld @@ -46,7 +46,7 @@ the GNU General Public License. This program has absolutely no warranty." exit 0 } -tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1 +tmp=$(getopt -o +q --long help,version,debug,quiet,$VS_ALLVSERVERS_ARGS -n "$0" -- "$@") || exit 1 eval set -- "$tmp" declare -a send_through vsomething_opts @@ -57,17 +57,24 @@ while true; do (--version) showVersion ;; (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;; (--quiet|-q) send_through=( "${send_through[@]}" "$1" );; - (--all) vsomething_opts=( "${vsomething_opts[@]}" "$1" );; + (--) test ${#vsomething_opts[@]} -eq 0 && shift; break;; + (*) vsomething_opts=( "${vsomething_opts[@]}" "$1" );; + esac + shift +done + +declare -a vserver_names + +while [ $# -gt 0 ]; do + case "$1" in (--) shift; break;; - (*) echo $"vemerge: internal error; arg=='$1'" >&2; exit 1;; + (*) vserver_names=( "${vserver_names[@]}" "$1" );; esac shift done -VSOMETHING_TITLE=vemerge +VSOMETHING_TITLE=vupdateworld VSOMETHING_PKGMGMT=1 export VSOMETHING_TITLE VSOMETHING_PKGMGMT - -test ${#vsomething_opts[@]} -eq 0 || vsomething_opts=( "${vsomething_opts[@]}" -- ) -exec $_VSOMETHING "${send_through[@]}" emerge "${vsomething_opts[@]}" world --update --deep --newuse "$@" +exec $_VSOMETHING "${send_through[@]}" emerge "${vsomething_opts[@]}" "${vserver_names[@]}" -- world --update --deep --newuse "$@"