Skip to content

Commit 3d2a091

Browse files
committed
fix: linux id detection
1 parent 97b91c0 commit 3d2a091

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/r-apt/install.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ usermod -a -G staff "${USERNAME}"
132132

133133
check_packages curl ca-certificates
134134

135+
# shellcheck source=/dev/null
136+
source /etc/os-release
135137
if [ "${ID}" = "ubuntu" ]; then
136138
echo "Set up r2u..."
137139
curl -fsSL https://eddelbuettel.github.io/r2u/assets/dirk_eddelbuettel_key.asc | tee -a /etc/apt/trusted.gpg.d/cranapt_key.asc >/dev/null
@@ -162,7 +164,8 @@ elif [ "${ID}" = "debian" ]; then
162164
# shellcheck disable=SC2206
163165
APT_PACKAGES=(${APT_PACKAGES[@]/r-cran-httpgd})
164166
else
165-
echo "Unreachable"
167+
echo "(!) Unsupported distribution: ${ID}"
168+
echo " This script is designed only for Debian and Ubuntu."
166169
exit 1
167170
fi
168171

0 commit comments

Comments
 (0)