-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgetiOSSDK.sh
More file actions
43 lines (34 loc) · 825 Bytes
/
Copy pathgetiOSSDK.sh
File metadata and controls
43 lines (34 loc) · 825 Bytes
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
#!/bin/bash
SDKURL="https://github.com/theos/sdks/archive/master.zip"
SDKZIP=master.zip
NCURSES_DIR="/usr/lib/libncursesw.dylib"
PROJECTDIR=$(basename "$PWD")
PACKAGES="wget clang libclang-common-10-dev libclang-cpp10 libc++-dev make unzip"
SDK_DIR="../sdks-master"
# Check privilleges
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# Install packages
# apt update
echo "Installing necessary packages..."
apt install $PACKAGES 1>/dev/null
# Install finished
# Now download sdk
if ! [ -d $SDK_DIR ]; then
cd ..
wget $SDKURL
# Decompress them
echo "Decompressing SDKs..."
unzip $SDKZIP 1>/dev/null
cd $PROJECTDIR
fi
# Copy ncurses to project dir for linking
if ! [ -e $NCURSES_DIR ]; then
echo "ncurses dynamic library cannot be found."
exit
fi
cp -rv $NCURSES_DIR .
mkdir bin
mkdir obj