summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtemplates/turris3x.run2
-rwxr-xr-xtemplates/turris4x.run2
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/turris3x.run b/templates/turris3x.run
index a9fb25d..c354b50 100755
--- a/templates/turris3x.run
+++ b/templates/turris3x.run
@@ -12,7 +12,7 @@ echo_stage "Get packages"
git_clone "git@cynerd.cz:openwrt-personal-pkgs" pkgs turris3x
SDK="$WORKSPACE/sdk.tar.bz2"
-if [ ! -e "$SDK" ] || [ $(expr $(date -u +%s) - $(stat -c %Z "$SDK")) -gt 86400 ]; then
+if [ -n "$CLEAN" ] || [ ! -e "$SDK" ] || [ $(expr $(date -u +%s) - $(stat -c %Z "$SDK")) -gt 86400 ]; then
echo_stage "Download SDK"
curl "$SDK_URI" > sdk.tar.bz2
mv sdk.tar.bz2 "$SDK"
diff --git a/templates/turris4x.run b/templates/turris4x.run
index 7118362..34bac9f 100755
--- a/templates/turris4x.run
+++ b/templates/turris4x.run
@@ -12,7 +12,7 @@ fi
curl "https://repo.turris.cz/$BOARD-$BRANCH/git-hash" > git-hash
cat git-hash
-if [ -f "$WORKSPACE/openwrt-git-hash" ] && cmp -s git-hash "$WORKSPACE/openwrt-git-hash"; then
+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