naiveproxy: add RAM detection

This commit is contained in:
CN_SZTL 2020-09-20 13:04:31 +08:00
parent b7da7b0277
commit d359dac91c
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
2 changed files with 5 additions and 1 deletions

View File

@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=naiveproxy
PKG_VERSION:=85.0.4183.83-3
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/klzgrad/naiveproxy/tar.gz/v$(PKG_VERSION)?

View File

@ -4,6 +4,9 @@
# --------------------------------------------------------
# Init build dependencies for naiveproxy
# Exit immediately with any error
set -e
# Read args from shell
target_arch="$1"
target_board="$2"
@ -21,6 +24,7 @@ ldso_path="/lib/$(find "${toolchain_dir}/" | grep -Eo "ld-musl-[a-z0-9_-]+\\.so\
# OS detection
[ "$(uname)" != "Linux" -o "$(uname -m)" != "x86_64" ] && { echo -e "Support Linux AMD64 only."; exit 1; }
[ "$(free | grep "Mem" | awk -F ' ' '{print $2}')" -lt "4000000" ] && { echo -e "Memory too low."; exit 1; }
cd "$PWD/src"