1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-03 17:50:11 +02:00
fdroidserver/buildserver/setup-env-vars
Hans-Christoph Steiner e449d2f583 buildserver: setup env vars using standard script
bash provides a standard file location for a script to be run when the
shell starts: /etc/profile.d/  This converts the scattered bits of code for
making ~/.bsenv into a single provisioning script to generate
/etc/profile.d/bsenv.sh, which gets automatically executed when bash starts
2016-06-15 15:26:35 +02:00

17 lines
360 B
Bash

#!/bin/sh
#
# sets up the environment vars needed by the build process
set -e
set -x
bsenv=/etc/profile.d/bsenv.sh
echo "# generated on "`date` > $bsenv
echo export ANDROID_HOME=$1 >> $bsenv
echo export ANDROID_NDK_HOME=$2 >> $bsenv
echo 'export PATH=$PATH:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:/opt/gradle/bin' >> $bsenv
chmod 0644 $bsenv