Skip to content

Commit 03226a8

Browse files
authored
Merge pull request rvm#3728 from mspaulding06/add-solus-support
Add support for Solus linux
2 parents 7115d0b + 873b039 commit 03226a8

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed

scripts/functions/detect_system

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ __rvm_detect_system()
115115
then
116116
_system_name="CentOS"
117117
_system_version="$(GREP_OPTIONS="" \command \grep -Eo '[0-9\.]+' /etc/centos-release | \command \awk -F. '{print $1}' | head -n 1)"
118+
elif
119+
[[ -f /etc/lsb-release ]] &&
120+
GREP_OPTIONS="" \command \grep "DISTRIB_ID=Solus" /etc/lsb-release >/dev/null
121+
then
122+
_system_name="Solus"
123+
_system_version="$(awk -F'=' '$1=="DISTRIB_RELEASE"{print $2}' /etc/lsb-release | head -n 1)"
118124
elif
119125
[[ -f /proc/devices ]] &&
120126
GREP_OPTIONS="" \command \grep -Eo "synobios" /proc/devices >/dev/null

scripts/functions/requirements/solus

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/usr/bin/env bash
2+
3+
requirements_solus_lib_installed()
4+
{
5+
eopkg li --no-color | __rvm_grep "^$1[[:space:]]\+" > /dev/null 2>&1 || return $?
6+
}
7+
8+
requirements_solus_lib_available()
9+
{
10+
eopkg la --no-color | __rvm_grep "^$1[[:space:]]\+" > /dev/null 2>&1 || return $?
11+
}
12+
13+
requirements_solus_install_custom()
14+
{
15+
requirements_rvm_pkg_libs_install "$@" || return $?
16+
}
17+
18+
requirements_solus_libs_install()
19+
{
20+
__rvm_try_sudo eopkg --no-color --yes-all it "$@" || return $?
21+
}
22+
23+
requirements_solus_check_binary()
24+
{
25+
__rvm_which "$1" >/dev/null || return $?
26+
}
27+
28+
requirements_solus_define()
29+
{
30+
case "$1" in
31+
(rvm)
32+
requirements_check bash curl patch ca-certs gawk bzip2
33+
;;
34+
(jruby*)
35+
if
36+
is_head_or_disable_binary "$1"
37+
then
38+
requirements_solus_check_binary javac ||
39+
requirements_check_fallback openjdk-8-devel
40+
requirements_check git
41+
if is_jruby_post17 "$1"
42+
then requirements_check_custom_after mvn=maven
43+
fi
44+
else
45+
requirements_solus_check_binary java ||
46+
requirements_check_fallback openjdk-8
47+
fi
48+
;;
49+
(ir*)
50+
true
51+
;;
52+
(opal)
53+
true
54+
;;
55+
(*-head)
56+
requirements_check git
57+
requirements_solus_define "${1%-head}"
58+
requirements_version_minimal autoconf 2.67
59+
;;
60+
(*)
61+
if [[ ${#rvm_patch_names[@]} -gt 0 ]]
62+
then requirements_version_minimal autoconf 2.67
63+
fi
64+
requirements_check autoconf gcc g++ glibc-devel patch readline readline-devel \
65+
zlib zlib-devel libffi-devel openssl-devel make bzip2 automake libtool \
66+
bison sqlite3-devel yaml-devel gmp-devel pkg-config ncurses-devel binutils \
67+
kernel-libc-devel
68+
;;
69+
esac
70+
}
71+

0 commit comments

Comments
 (0)