1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-05 06:50:10 +01:00
fdroidserver/buildserver/setup-env-vars
Hans-Christoph Steiner 09828f4a73 never wait for SSH prompts when running git commands
We never allow git via SSH or password/key access, and right now, this
causes things to hang forever.  This sets things up to fail quickly
with invalid ssh connections.

BatchMode=yes - passphrase/password querying will be disabled.

StrictHostKeyChecking=yes - never automatically prompt, or add host keys to
the ~/.ssh/known_hosts file, and refuse to connect to hosts whose host key
has changed.
2017-11-23 23:31:38 +01:00

20 lines
488 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
chmod 0644 $bsenv
# make sure that SSH never hangs at a password or key prompt
printf ' StrictHostKeyChecking yes' >> /etc/ssh/ssh_config
printf ' BatchMode yes' >> /etc/ssh/config