/
opensuse
executable file
·53 lines (48 loc) · 1.07 KB
/
opensuse
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env bash
function requirements_zypper()
{
typeset -a command_to_run command_flags
command_to_run=()
command_flags=()
while
(( $# ))
do
case "$1" in
(echo)
command_to_run+=( $1 )
shift
;;
(force)
command_flags+=( -y )
shift
;;
(*)
break
;;
esac
done
(( UID == 0 )) || command_to_run+=( sudo )
while
(( $# ))
do
case "$1" in
(update-system)
true
;;
(jruby*)
"${command_to_run[@]}" zypper install "${command_flags[@]}" java
;;
(ir*)
"${command_to_run[@]}" zypper install "${command_flags[@]}" mono
;;
(opal)
"${command_to_run[@]}" zypper install "${command_flags[@]}" nodejs
;;
(*)
"${command_to_run[@]}" zypper install "${command_flags[@]}" patterns-openSUSE-devel_basis gcc-c++ bzip2 readline-devel zlib-devel libxml2-devel libxslt-devel libyaml-devel libopenssl-devel libffi-devel libtool bison
;;
esac
shift
done
}
requirements_zypper "$@"