summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-08-07 09:45:24 +0200
committerErich Eckner <git@eckner.net>2018-08-07 09:45:24 +0200
commit3e83751bcc63ea655a923d6c4ba0430579c3d614 (patch)
tree59426707fde368fe0a146627ceff950fc8e2996f
parent499b1c4e797a2085b5c13301326f8c574782bff5 (diff)
downloadarchlinuxewe.git.save-3e83751bcc63ea655a923d6c4ba0430579c3d614.tar.xz
archPackagesUpdate: --arch neu
-rwxr-xr-xarchPackagesUpdate14
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