summaryrefslogtreecommitdiff
path: root/archPackagesUpdate
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-04-18 10:55:19 +0200
committerErich Eckner <git@eckner.net>2016-04-18 10:56:01 +0200
commit50b6b23342c943bf9df937025fa64cebb990fbf4 (patch)
treef16157581c3745a2aeeb11988604525303237ca7 /archPackagesUpdate
parent413c17ae0be7ae00941a8a623e37e7a38e40d847 (diff)
downloadarchlinuxewe.git.save-50b6b23342c943bf9df937025fa64cebb990fbf4.tar.xz
archPackagesUpdate kann jetzt unsignierte Pakete entfernen
Diffstat (limited to 'archPackagesUpdate')
-rwxr-xr-xarchPackagesUpdate37
1 files changed, 35 insertions, 2 deletions
diff --git a/archPackagesUpdate b/archPackagesUpdate
index 153b8af1..575e1561 100755
--- a/archPackagesUpdate
+++ b/archPackagesUpdate
@@ -12,6 +12,7 @@ force=false
upload=true
updateMe=true
abortOnMakepkgError=true
+cleanUnsigned=false
# print help screen
usage()
@@ -20,18 +21,19 @@ usage()
>&2 echo 'Skript zum Updaten der selbsterstellten Archlinux-Pakete'
>&2 echo ''
>&2 echo 'Verwendung:'
- >&2 echo ' '"$0"' [ -f|--force ] [ --no-upload ] [ --no-selfUpdate ] [ --no-abortOnMakepkgError ]'
+ >&2 echo ' '"$0"' [ -f|--force ] [ --no-upload ] [ --no-selfUpdate ] [ --no-abortOnMakepkgError ] [ -c|--cleanUnsigned ]'
>&2 echo ' -f|--force: rebuild packages even if they look up to date'
>&2 echo ' --no-upload: do not upload built packages from rechenknecht to jeti100'
>&2 echo ' --no-selfUpdate: do not update this script from git'
>&2 echo ' --no-abortOnMakepkgError: do not abort when makepkg returns non-zero'
+ >&2 echo ' -c|--cleanUnsigned: remove unsigned Packages first'
>&2 echo ''
rm -rf "${tmpDir}"
exit 1
}
echo 'parse arguments ...'
-eval set -- "$(getopt -o f --long force,no-upload,no-selfUpdate,no-abortOnMakepkgError -n "$(basename "$0")" -- "$@" || echo "usage")"
+eval set -- "$(getopt -o fc --long force,no-upload,no-selfUpdate,no-abortOnMakepkgError,cleanUnsigned -n "$(basename "$0")" -- "$@" || echo "usage")"
args=("$@")
while true
@@ -42,6 +44,11 @@ do
force=true
shift
;;
+ -c|--cleanUnsigned)
+ echo '"cleanUnsigned" erkannt'
+ cleanUnsigned=true
+ shift
+ ;;
--no-upload)
echo '"no-upload" erkannt'
upload=false
@@ -95,6 +102,32 @@ then
exit ${err}
fi
+# clean unsigned packages
+if ${cleanUnsigned} && ${aufRechenknecht}
+then
+ ssh paule@127.0.0.1 '
+ rmPaket() {
+ [ "$(basename "$(pwd)")" == "any" ] && return
+ repo-remove -v -s -k 0x20194BA1 archlinuxewe.db.tar.gz "${1%-*-*-*.pkg.tar.xz}"
+ rm "$1"
+ [ -e "$1.sig" ] && rm "$1.sig"
+ }
+
+ cd "'${pkgDir}'"
+ for arch in *
+ do
+ [ -d "${arch}" ] || continue
+ cd "${arch}"
+ for paket in *.pkg.tar.xz
+ do
+ [ -e "${paket}.sig" ] && continue
+ rmPaket ${paket}
+ done
+ cd ..
+ done
+ '
+fi
+
unset pakete
unset archs
unset verss