install-cross.sh
1.14 KB
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
54
55
56
57
58
59
60
#!/bin/bash
install_packages()
{
# Instala apicativos e temas necessários
sudo zypper --non-interactive in \
${1}-cross-gcc-c++ \
${1}-cross-pkg-config \
${1}-cross-cpp \
${1}-cross-binutils \
${1}-pw3270 \
${1}-lib3270-devel \
${1}-pw3270-devel
}
until [ -z "${1}" ]
do
if [ ${1:0:2} = '--' ]; then
tmp=${1:2}
parameter=${tmp%%=*}
parameter=$(echo $parameter | tr "[:lower:]" "[:upper:]")
case $parameter in
ar)
zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_42.2/ mingw32
zypper ar --refresh http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_42.2/ mingw64
zypper ar --refresh http://download.opensuse.org/repositories/home:/PerryWerneck:/mingw32/openSUSE_Leap_42.2/ mingw32-pw3270
zypper ar --refresh http://download.opensuse.org/repositories/home:/PerryWerneck:/mingw64/openSUSE_Leap_42.2/ mingw64-pw3270
zypper ref
;;
32)
install_packages mingw32
;;
64)
install_packages mingw64
;;
ALL)
install_packages mingw32
install_packages mingw64
;;
*)
value=${tmp##*=}
eval $parameter=$value
esac
fi
shift
done