diff options
author | Erich Eckner <git@eckner.net> | 2018-08-07 09:45:24 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-08-07 09:45:24 +0200 |
commit | 3e83751bcc63ea655a923d6c4ba0430579c3d614 (patch) | |
tree | 59426707fde368fe0a146627ceff950fc8e2996f | |
parent | 499b1c4e797a2085b5c13301326f8c574782bff5 (diff) | |
download | archlinuxewe.git.save-3e83751bcc63ea655a923d6c4ba0430579c3d614.tar.xz |
archPackagesUpdate: --arch neu
-rwxr-xr-x | archPackagesUpdate | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/archPackagesUpdate b/archPackagesUpdate index 295ebdfc..b3731ad0 100755 --- a/archPackagesUpdate +++ b/archPackagesUpdate @@ -33,6 +33,8 @@ usage() >&2 echo 'Skript zum Updaten der selbsterstellten Archlinux-Pakete' >&2 echo '' >&2 echo 'Optionen:' + >&2 echo ' --arch $arch:' + >&2 echo ' only compile for $arch' >&2 echo ' -b|--branch [commitish]:' >&2 echo ' branch to check out - defaults to "HEAD"' >&2 echo ' --cleanCache:' @@ -89,6 +91,7 @@ cleanUp () { echo 'parse arguments ...' eval set -- "$( getopt -o b:cfL:pr \ + --long arch: \ --long branch: \ --long cleanCache \ --long cleanUnsigned \ @@ -112,6 +115,11 @@ args=("$@") while true do case $1 in + --arch) + shift + echo '"arch '"$1"'" erkannt' + onlyArchs[${#onlyArchs[@]}]="$1" + ;; -b|--branch) shift branch="$1" @@ -317,6 +325,12 @@ then [ "${singleArch}" == "i686" ] || \ [ "${singleArch}" == "any" ] || \ continue + [ ${#onlyArchs[@]} -eq 0 ] && consider=true || consider=false + for ((i=0; i<${#onlyArchs[@]}; i++)) + do + [[ "${arch}" == "${onlyArchs[${i}]}" ]] && consider=true + done + ${consider} || continue allExist=true for pkgnam in "${pkgname[@]}"; do |