]> git.ipfire.org Git - thirdparty/git.git/commitdiff
ci/linux32: libify install-dependencies step
authorĐoàn Trần Công Danh <congdanhqx@gmail.com>
Sat, 4 Apr 2020 01:08:49 +0000 (08:08 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Apr 2020 20:44:42 +0000 (13:44 -0700)
In a later patch, we will add new Travis Job for linux-musl.
Most of other code in this file could be reuse for that job.

Move the code to install dependencies to a common script.
Should we add new CI system that can run directly in container,
we can reuse this script for installation step.

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ci/install-docker-dependencies.sh [new file with mode: 0755]
ci/run-docker-build.sh

diff --git a/ci/install-docker-dependencies.sh b/ci/install-docker-dependencies.sh
new file mode 100755 (executable)
index 0000000..a104c61
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# Install dependencies required to build and test Git inside container
+#
+
+case "$jobname" in
+Linux32)
+       linux32 --32bit i386 sh -c '
+               apt update >/dev/null &&
+               apt install -y build-essential libcurl4-openssl-dev \
+                       libssl-dev libexpat-dev gettext python >/dev/null
+       '
+       ;;
+esac
index a05b48c55915300ee06b68831ec5ae186b85a21c..4a153492ba29b26b4209399d372740aa89177968 100755 (executable)
@@ -23,12 +23,7 @@ Linux32)
        ;;
 esac
 
-# Update packages to the latest available versions
-command $switch_cmd sh -c '
-    apt update >/dev/null &&
-    apt install -y build-essential libcurl4-openssl-dev libssl-dev \
-       libexpat-dev gettext python >/dev/null
-'
+"${0%/*}/install-docker-dependencies.sh"
 
 # If this script runs inside a docker container, then all commands are
 # usually executed as root. Consequently, the host user might not be