summaryrefslogtreecommitdiffstats
path: root/.github/tools/install_ubuntu_packages.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-25 06:14:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-25 06:14:23 +0000
commit201d885cf454e026cf59e18961f025bcfa8a3142 (patch)
treebaf91f410e825f7768de9be51fe5e8556333bc7b /.github/tools/install_ubuntu_packages.sh
parentReleasing debian version 4.3+20240412-1. (diff)
downloadmdadm-201d885cf454e026cf59e18961f025bcfa8a3142.tar.xz
mdadm-201d885cf454e026cf59e18961f025bcfa8a3142.zip
Merging upstream version 4.3+20240723.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github/tools/install_ubuntu_packages.sh')
-rwxr-xr-x.github/tools/install_ubuntu_packages.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/.github/tools/install_ubuntu_packages.sh b/.github/tools/install_ubuntu_packages.sh
new file mode 100755
index 0000000..1a31ca4
--- /dev/null
+++ b/.github/tools/install_ubuntu_packages.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/bash
+
+VERSION_CODENAME=$(grep -oP '(?<=^VERSION_CODENAME=).+' /etc/os-release | tr -d '"')
+echo "Detected VERSION_CODENAME: $VERSION_CODENAME"
+
+# Add ubuntu repository
+sudo add-apt-repository -y "deb [arch=amd64] http://archive.ubuntu.com/ubuntu $VERSION_CODENAME \
+ main universe"
+# Install gcc
+sudo apt-get -y update && sudo apt-get -y install gcc-$1
+# Install dependencies
+sudo apt-get -y install make gcc libudev-dev devscripts