Skip to content

Commit 0e3a348

Browse files
committed
Add alpine-specific commands
1 parent 4282113 commit 0e3a348

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

ci/scripts/r_docker_configure.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ elif [ "`which yum`" ]; then
3939
PACKAGE_MANAGER=yum
4040
elif [ "`which zypper`" ]; then
4141
PACKAGE_MANAGER=zypper
42+
elif [ "`which apk`" ]; then
43+
PACKAGE_MANAGER=apk
4244
else
4345
PACKAGE_MANAGER=apt-get
4446
apt-get update --allow-releaseinfo-change # flag needed for when debian version changes
@@ -49,8 +51,12 @@ fi
4951
R_CUSTOM_CCACHE=`echo $R_CUSTOM_CCACHE | tr '[:upper:]' '[:lower:]'`
5052
if [ ${R_CUSTOM_CCACHE} = "true" ]; then
5153
# install ccache
52-
$PACKAGE_MANAGER install -y epel-release || true
53-
$PACKAGE_MANAGER install -y ccache
54+
if [ "$PACKAGE_MANAGER" = "apk" ]; then
55+
$PACKAGE_MANAGER add ccache
56+
else
57+
$PACKAGE_MANAGER install -y epel-release || true
58+
$PACKAGE_MANAGER install -y ccache
59+
fi
5460

5561
mkdir -p ~/.R
5662
echo "VER=
@@ -73,7 +79,11 @@ fi
7379

7480
# Install rsync for bundling cpp source and curl to make sure it is installed on all images,
7581
# cmake is now a listed sys req.
76-
$PACKAGE_MANAGER install -y rsync cmake curl
82+
if [ "$PACKAGE_MANAGER" = "apk" ]; then
83+
$PACKAGE_MANAGER add rsync cmake curl
84+
else
85+
$PACKAGE_MANAGER install -y rsync cmake curl
86+
fi
7787

7888
# Update clang version to latest available.
7989
# This is only for rhub/clang20. If we change the base image from rhub/clang20,

0 commit comments

Comments
 (0)