aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2020-05-08 09:22:25 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2020-05-08 09:23:25 -0700
commit7a8c6192d5f76b521d6f307bf2227a18508bf5d5 (patch)
tree44147b5c15630f98cbce245ec14048cb7fe9ccaa
parentmastermirror-staging: better checking of required commands (diff)
downloadmastermirror-scripts-7a8c6192d5f76b521d6f307bf2227a18508bf5d5.tar.gz
mastermirror-scripts-7a8c6192d5f76b521d6f307bf2227a18508bf5d5.tar.bz2
mastermirror-scripts-7a8c6192d5f76b521d6f307bf2227a18508bf5d5.zip
mastermirror-staging: use newer git-restore-mtime20200508T162453Z
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-xmastermirror-staging.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/mastermirror-staging.sh b/mastermirror-staging.sh
index 22c76aa..d929aa2 100755
--- a/mastermirror-staging.sh
+++ b/mastermirror-staging.sh
@@ -24,7 +24,9 @@ GIT_CL="${GIT} clone -q"
GIT_PL="${GIT} pull -q --ff-only --no-stat --no-rebase"
WGET="/usr/bin/wget --timeout=2 --quiet --timestamping"
-GIT_RESTORE_MTIME="/usr/lib/python-exec/python3.6/git-restore-mtime -q -m -c --first-parent"
+
+GIT_RESTORE_MTIME="$(find /usr/lib/python-exec/python*/ -maxdepth 1 -name git-restore-mtime |sort -r |head -n1)"
+GIT_RESTORE_MTIME_ARGS="-q -m -c --first-parent"
rc=0
for cmdname in \
@@ -93,7 +95,7 @@ fetch_git() {
cd "${targetdir}" || return 1
$GIT fetch -q --force origin master || return 1
$GIT reset -q --hard origin/master || return 1
- $GIT_RESTORE_MTIME || return 1
+ $GIT_RESTORE_MTIME $_GIT_RESTORE_MTIME_ARGS || return 1
TZ=UTC $GIT log -1 --date=iso-strict-local --format='%H %ct %cd' >${timestampfile}
}