forked from vitasdk/vdpm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap-vitasdk.sh
executable file
·42 lines (34 loc) · 1.17 KB
/
bootstrap-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
#!/bin/bash
set -e
case "$(uname -s)" in
Darwin*)
SUPPORTED=11
OSVERSION=$(sw_vers -productVersion)
if [ ${OSVERSION:0:2} -lt $SUPPORTED ]; then
echo "You are running an older Mac OS version, you will need to connect to github insecurely. A bad actor will be able to pretend to be github and serve you malware. Do you wish to continue? (y/n)"
read -r RESPONSE
if [[ $RESPONSE =~ ^[Yy]$ ]]; then
echo "Continue insecurely..."
else
echo "Aborting..."
exit 0
fi
fi
;;
*)
echo "Continue..."
;;
esac
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
INSTALLDIR="${VITASDK:-/usr/local/vitasdk}"
. "$DIR/include/install-vitasdk.sh"
if [ -d "$INSTALLDIR" ]; then
echo "$INSTALLDIR already exists. Remove it first (e.g. 'sudo rm -rf $INSTALLDIR' or 'rm -rf $INSTALLDIR') and then restart this script"
exit 1
fi
echo "==> Installing vitasdk to $INSTALLDIR"
install_vitasdk $INSTALLDIR
echo "Please add the following to the bottom of your .bashrc:"
printf "\033[0;36m""export VITASDK=${INSTALLDIR}""\033[0m\n"
printf "\033[0;36m"'export PATH=$VITASDK/bin:$PATH'"\033[0m\n"
echo "and then restart your terminal"