forked from vitasdk/vdpm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-vitasdk.sh
executable file
·63 lines (54 loc) · 1.77 KB
/
install-vitasdk.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
#!/bin/bash
get_download_link () {
case "$(uname -s)" in
Darwin*)
SUPPORTED=11
OSVERSION=$(sw_vers -productVersion)
if [ ${OSVERSION:0:2} -lt $SUPPORTED ]; then
wget -qO- https://github.com/vitasdk/vita-headers/raw/master/.travis.d/last_built_toolchain.py --no-check-certificate | $(which python||which python3) - $@
else
wget -qO- https://github.com/vitasdk/vita-headers/raw/master/.travis.d/last_built_toolchain.py | python3 - $@
fi
;;
*)
wget -qO- https://github.com/vitasdk/vita-headers/raw/master/.travis.d/last_built_toolchain.py | python3 - $@
;;
esac
}
install_vitasdk () {
INSTALLDIR=$1
case "$(uname -s)" in
Darwin*)
mkdir -p $INSTALLDIR
if [ ${OSVERSION:0:2} -lt $SUPPORTED ]; then
wget -O- "$(get_download_link master osx)" --no-check-certificate | tar xj -C $INSTALLDIR --strip-components=1
else
wget -O- "$(get_download_link master osx)" | tar xj -C $INSTALLDIR --strip-components=1
fi
;;
Linux*)
if [ -n "${TRAVIS}" ]; then
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 patch
fi
command -v curl || { echo "curl missing (install using: apt install curl)" ; exit 1; }
if [ ! -d "$INSTALLDIR" ]; then
sudo mkdir -p $INSTALLDIR
sudo chown $USER:$(id -gn $USER) $INSTALLDIR
fi
wget -O- "$(get_download_link master linux)" | tar xj -C $INSTALLDIR --strip-components=1
;;
MSYS*|MINGW64*)
UNIX=false
mkdir -p $INSTALLDIR
wget -O- "$(get_download_link master win)" | tar xj -C $INSTALLDIR --strip-components=1
;;
CYGWIN*|MINGW32*)
echo "Please use msys2. Exiting..."
exit 1
;;
*)
echo "Unknown OS"
exit 1
;;
esac
}