diff options
| author | 2018-06-26 00:59:25 +0200 | |
|---|---|---|
| committer | 2018-06-26 01:00:26 +0200 | |
| commit | fc2661f08a3ef08edec7704339577cc5c8c962e7 (patch) | |
| tree | f34e5db3b2dc797531ec0da7fba701d294e09960 | |
| parent | patch-kernel: do not do freaky things to index (diff) | |
| download | android_kernel_wireguard-fc2661f08a3ef08edec7704339577cc5c8c962e7.tar.xz android_kernel_wireguard-fc2661f08a3ef08edec7704339577cc5c8c962e7.zip | |
patch-kernel: only allow one execution at a time, with others failing open
| -rw-r--r-- | fetch.sh | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2,6 +2,9 @@ set -e USER_AGENT="WireGuard-AndroidROMBuild/0.1 ($(uname -a))" +exec 9>.wireguard-fetch-lock +flock -n 9 || exit 0 + [[ $(( $(date +%s) - $(stat -c %Y "net/wireguard/.check" 2>/dev/null || echo 0) )) -gt 86400 ]] || exit 0 [[ $(curl -A "$USER_AGENT" -LSs https://git.zx2c4.com/WireGuard/refs/) =~ snapshot/WireGuard-([0-9.]+)\.tar\.xz ]] |
