summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-04-20 11:29:40 +0200
committerErich Eckner <git@eckner.net>2016-04-20 11:29:40 +0200
commitf2ca9782a1c55e629ff2eb4cd001f8f920fe8f43 (patch)
treee0448e410ea06bd76867fcd02120eac50bf5c8cb
parentdba23d885de931cf8b1a65afc65a14b81b91a515 (diff)
downloadarchlinuxewe-f2ca9782a1c55e629ff2eb4cd001f8f920fe8f43.tar.xz
archPackagesUpdate --cleanCache neu
-rwxr-xr-xarchPackagesUpdate27
1 files changed, 25 insertions, 2 deletions
diff --git a/archPackagesUpdate b/archPackagesUpdate
index ca029d79f..4d6c88b56 100755
--- a/archPackagesUpdate
+++ b/archPackagesUpdate
@@ -13,6 +13,7 @@ force=false
upload=true
updateMe=true
abortOnMakepkgError=true
+cleanCache=false
cleanUnsigned=false
checkDbSig='-v'
rmAddPkgs=false
@@ -24,7 +25,10 @@ usage()
>&2 echo 'Skript zum Updaten der selbsterstellten Archlinux-Pakete'
>&2 echo ''
>&2 echo 'Verwendung:'
- >&2 echo ' '"$0"' [ -c|--cleanUnsigned ] [ -f|--force ] [ --ignore-wrong-db-signature ] [ --no-upload ] [ --no-selfUpdate ] [ --no-abortOnMakepkgError ] [ --only $package ] [ -r|--removeAdditionalPackages ]'
+ >&2 echo ' '"$0"' [ -c|--cleanUnsigned ] [ -f|--force ] [ --ignore-wrong-db-signature ]' \
+ '[ --no-upload ] [ --no-selfUpdate ] [ --no-abortOnMakepkgError ]' \
+ '[ --only $package ] [ -r|--removeAdditionalPackages ]' \
+ '[ --cleanCache ]'
>&2 echo ' -c|--cleanUnsigned:'
>&2 echo ' remove unsigned Packages first'
>&2 echo ' -f|--force:'
@@ -41,13 +45,15 @@ usage()
>&2 echo ' only consider $package for build and update process'
>&2 echo ' -r|--removeAdditionalPackages:'
>&2 echo ' remove additional packages from build environments'
+ >&2 echo ' --cleanCache:'
+ >&2 echo ' clean up pacman cache in build environments'
>&2 echo ''
rm -rf "${tmpDir}"
exit 1
}
echo 'parse arguments ...'
-eval set -- "$(getopt -o cfr --long cleanUnsigned,force,ignore-wrong-db-signature,no-upload,no-selfUpdate,no-abortOnMakepkgError,only:,removeAdditionalPackages -n "$(basename "$0")" -- "$@" || echo "usage")"
+eval set -- "$(getopt -o cfr --long cleanCache,cleanUnsigned,force,ignore-wrong-db-signature,no-upload,no-selfUpdate,no-abortOnMakepkgError,only:,removeAdditionalPackages -n "$(basename "$0")" -- "$@" || echo "usage")"
args=("$@")
while true
@@ -57,6 +63,10 @@ do
echo '"force" erkannt'
force=true
;;
+ --cleanCache)
+ echo '"cleanCache" erkannt'
+ cleanCache=true
+ ;;
-c|--cleanUnsigned)
echo '"cleanUnsigned" erkannt'
cleanUnsigned=true
@@ -288,6 +298,19 @@ then
${err} && exit 1
+# clean pacman cache
+ if ${cleanCache}
+ then
+ for chrootArch in 32 64
+ do
+ echo '
+ sudo pacman -Sc --noconfirm
+ exit
+ ' | \
+ chrootUnpriv "${chrootArch}"
+ done
+ fi
+
maxErr=0
# generate current makepkg.conf and makepkg32.conf