1#!/bin/sh2#3# Build and test Git in a 32-bit environment4#5# Usage:6# run-linux32-build.sh [host-user-id]7#89# Update packages to the latest available versions10linux32 --32bit i386 sh -c '11apt update >/dev/null &&12apt install -y build-essential libcurl4-openssl-dev libssl-dev \13libexpat-dev gettext python >/dev/null14' &&1516# If this script runs inside a docker container, then all commands are17# usually executed as root. Consequently, the host user might not be18# able to access the test output files.19# If a host user id is given, then create a user "ci" with the host user20# id to make everything accessible to the host user.21HOST_UID=$1 &&22CI_USER=$USER &&23test -z $HOST_UID || (CI_USER="ci" && useradd -u $HOST_UID $CI_USER) &&2425# Build and test26linux32 --32bit i386 su -m -l $CI_USER -c '27cd /usr/src/git &&28make --jobs=2 &&29make --quiet test30'