1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 14:30:11 +01:00
fdroidserver/buildserver/setup-env-vars
Hans-Christoph Steiner 4e310e3a59
buildserver: setup-env-vars: add var for ~vagrant for CI jobs
The CI jobs need to do a little setup based on the 'vagrant' user's $HOME.
2022-01-11 11:23:44 +01:00

23 lines
666 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 PATH=$PATH:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:/opt/gradle/bin' >> $bsenv
echo "export DEBIAN_FRONTEND=noninteractive" >> $bsenv
echo 'export home_vagrant=/home/vagrant' >> $bsenv
echo 'export fdroidserver=$home_vagrant/fdroidserver' >> $bsenv
chmod 0644 $bsenv
# make sure that SSH never hangs at a password or key prompt
printf ' StrictHostKeyChecking yes\n' >> /etc/ssh/ssh_config
printf ' BatchMode yes\n' >> /etc/ssh/ssh_config