forked from voorhees1979/PUAE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_deps.sh
executable file
·75 lines (66 loc) · 1.3 KB
/
install_deps.sh
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# package managers
package_managers=("aptitude" "emerge" "yum" "urpmi" "pacman" "zypper");
# linux
apt_32 = "apt-get install build-essential automake zlib1g libsdl1.2-dev libgtk2.0-dev xorg-core";
# macosx
# platform
echo "* Checking platform...";
platform=""
if [ `uname` == "Darwin" ]; then
platform="osx"
echo " Darwin";
elif [ `uname` == "Linux" ]; then
platform="linux"
echo " Linux";
fi
# bits
echo "* Checking architecture...";
is_64_bit=0
if [ `uname -m` == "x86_64" ]; then
is_64_bit=1
echo " 64 bit";
else
echo " 32 bit";
fi
# package manager
echo "* Checking package manager...";
package_manager=""
for pm in ${package_managers[@]}; do
if [ ! -f "`which $pm`" ]; then
continue;
fi
package_manager=$pm;
echo " $pm";
break;
done
# who am i?
need_sudo=1
if [ `whoami` = "root" ]; then
need_sudo=0
echo "* Logged in as root user...";
else
echo "!! You need to login as root (or sudo) !!";
fi
if [ need_sudo ]
apt_32 = "sudo " + apt_32
if
#
# Install Deps
#
if [ platform == "linux" ]
if [ is_64_bit == 0]
# LINUX 32b start
echo ">> Installing Linux 32 bit deps";
if [ package_manager==aptitude ]
fi
# LINUX 32b end
else
# LINUX 64b start
echo ">> Installing Linux 64 bit deps";
# LINUX 64b end
fi
elif [ platform == "osx" ]
# MACOSX start
echo ">> Installing MACOSX deps";
# MACOSX end
fi