From 0a442b052000d5deeb1d0bf3db79a3fe7b5daa93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 10 Oct 2018 18:27:14 +0200 Subject: turris4x: tar sdk It also for now drops flock. Change of sdk should be atomic thanks to mv. --- templates/turris4x.run | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/templates/turris4x.run b/templates/turris4x.run index 794bd04..49d82cb 100755 --- a/templates/turris4x.run +++ b/templates/turris4x.run @@ -12,10 +12,10 @@ fi curl "https://repo.turris.cz/$BOARD-$BRANCH/git-hash" > git-hash cat git-hash +# TODO take lock so we won't run multiple instances of new builds if [ -z "$CLEAN" ] && [ -f "$WORKSPACE/openwrt-git-hash" ] && cmp -s git-hash "$WORKSPACE/openwrt-git-hash"; then echo_info "Using previous version of SDK" - flock --shared "$WORKSPACE/openwrt-sdk.lock" \ - cp -a "$WORKSPACE/openwrt-sdk" openwrt + tar -xzf "$WORKSPACE/openwrt.tar.gz" else echo_info "Building new version of SDK" echo_stage "Get turris-build" @@ -24,16 +24,15 @@ else echo_stage "Prepare SDK" mkdir openwrt - flock --exclusive "$WORKSPACE/openwrt-sdk.lock" /bin/sh -s <