aboutsummaryrefslogtreecommitdiffstats
path: root/build_release.sh
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-02-25 11:34:04 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2021-02-25 11:34:22 +0100
commit8858c4b407d6bda8184ae4f49c0c9a27941ef76e (patch)
treecabc21f1908dd302e4fa1858033b85e7a03a5488 /build_release.sh
parent102cb10bc6a35ca04624b8cd9e52a234778b4f50 (diff)
downloadvendor_replicant-release-scripts-8858c4b407d6bda8184ae4f49c0c9a27941ef76e.tar.gz
vendor_replicant-release-scripts-8858c4b407d6bda8184ae4f49c0c9a27941ef76e.tar.bz2
vendor_replicant-release-scripts-8858c4b407d6bda8184ae4f49c0c9a27941ef76e.zip
Rename releasebuild.sh to build_release.sh
The releasebuild name could make people think that this script will release a build. Instead it builds a release. So it's better to rename it to reflect that. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'build_release.sh')
-rwxr-xr-xbuild_release.sh63
1 files changed, 63 insertions, 0 deletions
diff --git a/build_release.sh b/build_release.sh
new file mode 100755
index 0000000..2228c5c
--- /dev/null
+++ b/build_release.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+#
+# Copyright (C) 2017 Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+set -e
+
+SCRIPT=$0
+REPLICANT_DIR=$1
+
+. releasevars.sh
+
+ARGS_COUNT=1
+parallel_tasks=$(echo "$(grep 'processor' /proc/cpuinfo | wc -l ) + 1" | bc)
+
+build_all () {
+ dir=$( pwd )
+ cd "$REPLICANT_DIR"
+
+ for device in $RELEASE_DEVICES
+ do
+ vendor/replicant/build.sh $device
+ done
+
+ cd "$dir"
+}
+
+prepare () {
+ dir=$( pwd )
+ cd "$REPLICANT_DIR"
+
+ make clobber
+ ./vendor/replicant/build-toolchain
+
+ cd "$dir"
+}
+
+print_help () {
+ echo "$SCRIPT: [REPLICANT_DIR]"
+}
+
+# Check for the correct number of args
+if [ "$#" -lt "$ARGS_COUNT" ]
+then
+ print_help
+ exit 1
+fi
+
+prepare
+build_all