Skip to content

Commit 75e230d

Browse files
committed
Code refactoring, all content except Cpython
1 parent 5380cb3 commit 75e230d

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/install-krb5.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
3+
set -Eexuo pipefail
4+
shopt -s nullglob
5+
6+
if [[ $OSTYPE == linux* ]]; then
7+
if [ "$(id -u)" = "0" ]; then
8+
SUDO=
9+
else
10+
SUDO=sudo
11+
fi
12+
13+
if [ -e /etc/os-release ]; then
14+
source /etc/os-release
15+
elif [ -e /etc/centos-release ]; then
16+
ID="centos"
17+
VERSION_ID=$(cat /etc/centos-release | cut -f3 -d' ' | cut -f1 -d.)
18+
else
19+
echo "install-krb5.sh: cannot determine which Linux distro this is" >&2
20+
exit 1
21+
fi
22+
23+
if [ "${ID}" = "debian" -o "${ID}" = "ubuntu" ]; then
24+
export DEBIAN_FRONTEND=noninteractive
25+
26+
$SUDO apt-get update
27+
$SUDO apt-get install -y --no-install-recommends \
28+
libkrb5-dev krb5-user krb5-kdc krb5-admin-server
29+
elif [ "${ID}" = "almalinux" ]; then
30+
$SUDO dnf install -y krb5-server krb5-workstation krb5-libs krb5-devel
31+
elif [ "${ID}" = "centos" ]; then
32+
$SUDO yum install -y krb5-server krb5-workstation krb5-libs krb5-devel
33+
elif [ "${ID}" = "alpine" ]; then
34+
$SUDO apk add krb5 krb5-server krb5-dev
35+
else
36+
echo "install-krb5.sh: Unsupported linux distro: ${distro}" >&2
37+
exit 1
38+
fi
39+
else
40+
echo "install-krb5.sh: unsupported OS: ${OSTYPE}" >&2
41+
exit 1
42+
fi

0 commit comments

Comments
 (0)