diff --git a/build_tools/build.sh b/build_tools/build.sh index 92903e694..641ba7f64 100755 --- a/build_tools/build.sh +++ b/build_tools/build.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash # script for fast installing on raspberry pi, odroid and other arm boards with debian set -e @@ -10,8 +11,9 @@ set -x # curl https://raw.githubusercontent.com/freeminer/freeminer/master/build_tools/build.sh | sh #1. To compile need to install packages: -DIST_ID=`lsb_release --short --id` -if [ "$DIST_ID" = "Debian" ] || [ "$DIST_ID" = "Ubuntu" ]; then +DIST=${DIST=`lsb_release --short --id`} +DIST=${DIST=`cat /etc/issue /etc/issue.net | head -n1 | cut -d " " -f1`} +if [ "$DIST" = "Debian" ] || [ "$DIST" = "Ubuntu" ]; then sudo apt install -y git subversion build-essential cmake ninja-build ccache libbz2-dev libzstd-dev libjpeg-dev libfreetype6-dev libxxf86vm-dev libxi-dev libsqlite3-dev libhiredis-dev libvorbis-dev libopenal-dev libcurl4-openssl-dev libluajit-5.1-dev libleveldb-dev libsnappy-dev libgettextpo0 libmsgpack-dev libboost-system-dev clang lld llvm libc++-dev libc++abi-dev for PACKAGE in libpng12-dev libpng-dev libgles1-mesa-dev libgles2-mesa-dev libgl1-mesa-dev libunwind-dev ; do sudo apt install -y $PACKAGE ||: