summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-10-10 10:51:38 +0200
committerErich Eckner <git@eckner.net>2019-10-10 10:51:38 +0200
commit0cf34516587c205d8833c5339d97cd5ca93ecd06 (patch)
tree8a784cb50cbaa7a5235cf974404912d52a326515
parent91b9f01dcb243e764d484a47288a5e0c5944d660 (diff)
downloadarchlinuxewe-0cf34516587c205d8833c5339d97cd5ca93ecd06.tar.xz
bumpVersion: -f neu
-rwxr-xr-xbumpVersion11
-rwxr-xr-xcheckVersions13
2 files changed, 19 insertions, 5 deletions
diff --git a/bumpVersion b/bumpVersion
index 30523ecd3..a6a435083 100755
--- a/bumpVersion
+++ b/bumpVersion
@@ -8,13 +8,17 @@ verwendung() {
>&2 echo "$(basename "$0")"': aktualisiere Version von Paketen in archlinuxewe'
>&2 echo ''
>&2 echo 'mögliche Optionen:'
+ >&2 echo ' -f|--force: übergehe Cache'
>&2 echo ' -h|--help: zeige diese Hilfe'
>&2 echo ' -n|--nicht $paket: ignoriere Paket $paket'
[ -z "$1" ] && exit 1 || exit $1
}
+check_version_cache_option=''
+
eval set -- "$(
- getopt -o hn: \
+ getopt -o fhn: \
+ --long force \
--long help \
--long nicht: \
-n "$(basename "$0")" -- "$@" || \
@@ -28,6 +32,9 @@ while true; do
-h|--help)
verwendung 0
;;
+ -f|--force)
+ check_version_cache_option='--no-cache'
+ ;;
-n|--nicht)
shift
nichtPakete="$(printf '%s\n%s' "${nichtPakete}" "$1" | grep -v '^$')"
@@ -75,7 +82,7 @@ paket="${1%/}"
cd "${myDir}"
[ -r "${paket}/PKGBUILD" ] || exit 1
-vers="$(./checkVersions -m "${paket}")"
+vers="$(./checkVersions -m "${paket}" ${check_version_cache_option})"
[ -n "${remVer}" ] && vers="$(echo "${vers}" | grep -v 'remVer')"
eval ${vers}
if [ "${remVer}" == "${pkgver}" ]; then
diff --git a/checkVersions b/checkVersions
index 21fa12f8c..32d4f7721 100755
--- a/checkVersions
+++ b/checkVersions
@@ -2,7 +2,7 @@
usage() {
>&2 echo 'Verwendung: '
- >&2 echo " $0"' [--32] [-f|--force] [-j|--jobs=${jobs}]'
+ >&2 echo " $0"' [--32] [-f|--force] [-n|--no-cache] [-j|--jobs=${jobs}]'
>&2 echo ' --32: Versionen in archlinux32 statt archlinuxewe prüfen'
>&2 echo ' -f|--force|--noUpdate: prüfe Versionen unhabhängig von Zeit der letzten Prüfung'
>&2 echo ' -j|--jobs: Anzahl parallel auszufuehrender Anfragen'
@@ -24,7 +24,8 @@ curl_it() {
)
shift
cache_file="${curl_cache}/${cache_file}"
- if [ -s "${cache_file}" ] && \
+ if ${use_cache} && \
+ [ -s "${cache_file}" ] && \
[ $(stat -c%Y "${cache_file}") -gt $(($(date +%s)-300)) ] &&
! grep -qiF 'access denied' "${cache_file}"; then
cat "${cache_file}"
@@ -92,11 +93,12 @@ archlinuxewe=true
eval set -- "$(
getopt \
- -o fj:m \
+ -o fj:mn \
--long 32 \
--long force \
--long jobs: \
--long noUpdate \
+ --long no-cache \
-n "$(basename "$0")" \
-- \
"$@" \
@@ -105,6 +107,8 @@ eval set -- "$(
args=("$@")
optArgs=()
+use_cache=true
+
while true
do
case $1 in
@@ -131,6 +135,9 @@ do
optArgs[${#optArgs[@]}]="-m"
maschinenlesbar=true
;;
+ -n|--no-cache)
+ use_cache=false
+ ;;
--)
shift
break