#!/bin/sh # vim: ft=sh set -e . utils echo_stage "Get packages" git_fetch "https://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 echo_stage "Download SDK" curl "$SDK_URI" > sdk.tar.bz2 mv sdk.tar.bz2 "$SDK" else echo_stage "Skipping download" fi echo_stage "Export SDK" tar -xjf "$WORKSPACE/sdk.tar.bz2" cd OpenWrt-SDK-* echo_stage "Copy packages" cp -r ../pkgs/* package/ echo_stage "Build" make -j4 echo_stage "Sign" ./staging_dir/host/bin/usign -S -s ~/openwrt-repo.key -m "bin/$ARCH/packages/base/Packages" echo_stage "Deploy" ssh upload rm -rf "deploy-turris3x-$BOARD" scp -r "bin/$ARCH/packages/base" upload:deploy-turris3x-$BOARD exit 0 # Disable deploy for now ssh upload /bin/sh -ex <