-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall-theos
542 lines (498 loc) · 20.3 KB
/
install-theos
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
#!/usr/bin/env bash
# Error codes + association:
# 1 - Running as root
# 2 - Unsupported platform
# 3 - Dependency issue
# 4 - Unsupported shell
# 5 - Setting $THEOS failed
# 6 - Theos clone failed
# 7 - Toolchain install failed
# 8 - SDK install failed
# 9 - Checkra1n '/opt' setup failed
# 10 - WSL1 fakeroot->fakeroot-tcp failed
# 11 - Enabling Linux binary compat on FreeBSD failed
set -e
# Pretty print
special() {
printf "\e[0;34m==> \e[1;34mTheos Installer:\e[m %s\n" "$1"
}
update() {
printf "\n\e[0;36m==> \e[1;36m%s\e[m\n" "$1"
}
common() {
printf "\n\e[0;37m==> \e[1;37m%s\e[m\n" "$1"
}
error() {
printf "\e[0;31m==> \e[1;31m%s\e[m\n" "$1"
}
# Root is no bueno
if [[ $EUID -eq 0 ]]; then
error "Theos should NOT be installed with or run as root (su/sudo)!"
error " - Please re-run the installer as a non-root user."
exit 1
fi
# Common vars
PLATFORM=$(uname)
CSHELL="${SHELL##*/}"
SHELL_ENV="unknown"
if [[ $CSHELL == sh || $CSHELL == bash || $CSHELL == dash ]]; then
# Arch doesn't have/read from .profile :/
if [[ -f $HOME/.bash_profile && ! -f $HOME/.profile ]]; then
SHELL_ENV="$HOME/.bash_profile"
else
SHELL_ENV="$HOME/.profile"
fi
elif [[ $CSHELL == zsh ]]; then
SHELL_ENV="$HOME/.zshenv"
# TODO
# elif [[ $CSHELL == csh ]]; then
# SHELL_ENV="$HOME/.cshrc"
fi
NONINTERACTIVE=0
if ! [[ -z $CI ]]; then
NONINTERACTIVE=1
fi
# The work
theos_bool() {
AFFIRMATIVE=(Y y YES yes TRUE true)
if [[ ${AFFIRMATIVE[*]} =~ $1 ]]; then
return 0
else
return 1
fi
}
set_theos() {
# Check for $THEOS env var
update "Checking for \$THEOS environment variable..."
if ! [[ -z $THEOS ]]; then
update "\$THEOS is already set to '$THEOS'. Nothing to do here."
else
update "\$THEOS has not been set. Setting now..."
if [[ $SHELL_ENV == unknown ]]; then
error "Current shell ($CSHELL) is unsupported by this installer. Please set the THEOS environment variable to '~/theos' manually before proceeding."
exit 4
fi
# Set $THEOS
if [[ $PLATFORM == Darwin && ! -x $(command -v xcode-select) && -f /.bootstrapped ]]; then
# checkra1n has no exec in var, so need to set
# up '/opt' for use with Theos as mobile user
echo "export THEOS=/opt/theos" >> "$SHELL_ENV"
export THEOS=/opt/theos
if [[ -d /opt ]]; then
update "'/opt' already exists. Checking its ownership..."
# Check that '/opt' isn't owned by root
OWNER="$(stat -c '%U' /opt)"
if [[ ${OWNER,,} == root ]]; then
update "Owner of '/opt' is root. Attempting to switch owner to mobile..."
sudo chown mobile /opt \
&& update "Owner of '/opt' successfully transfered to mobile from root!" \
|| (error "Failed to transfer ownership of '/opt' to mobile from root. Please see the log above."; exit 9)
else
update "Owner of '/opt' is not root. We should be good to go!"
fi
else
update "Creating a special directory to house Theos..."
sudo install -d -o mobile -g mobile /opt \
&& update "Special directory for Theos created successfully!" \
|| (error "Special directory create command seems to have encountered an error. Please see the log above."; exit 9)
fi
else
echo "export THEOS=~/theos" >> "$SHELL_ENV"
export THEOS=~/theos
fi
fi
}
get_theos() {
# Get Theos
update "Checking for Theos install..."
if [[ -d $THEOS && $(ls -A "$THEOS") ]]; then
update "Theos appears to already be installed. Checking for updates..."
$THEOS/bin/update-theos
else
update "Theos does not appear to be installed. Cloning now..."
git clone --recursive https://github.com/theos/theos.git $THEOS \
&& update "Git clone of Theos was successful!" \
|| (error "Theos git clone command seems to have encountered an error. Please see the log above."; exit 6)
fi
}
get_sdks() {
# Get patched sdks
update "Checking for patched sdks..."
if [[ -d $THEOS/sdks/ && $(ls -A "$THEOS/sdks/" | grep sdk) ]]; then
update "SDKs appear to already be installed."
else
update "SDKS do not appear to be installed. Installing now..."
curl -L https://api.github.com/repos/theos/sdks/tarball -o sdks.tar.gz
TMP=$(mktemp -d)
tar -xvf sdks.tar.gz --strip=1 -C $TMP
mv $TMP/*.sdk $THEOS/sdks
rm -r sdks.tar.gz $TMP
if [[ -d $THEOS/sdks/ && $(ls -A "$THEOS/sdks/" | grep sdk) ]]; then
update "SDKs successfully installed!"
else
error "Something appears to have gone wrong. Please try again."
exit 8
fi
fi
}
darwin() {
# Check for Xcode
XCODE="$(xcode-select -p)"
if [[ $XCODE != *.app/Contents/Developer ]]; then
error "Xcode, not just the Command Line Tools, is required for Theos to function properly. Please install Xcode before continuing with the installation."
common "We recommend that you install Xcode from https://developer.apple.com/download/applications/ instead of from the Mac App Store as it's much faster."
exit 3
fi
# Dependencies
update "Preparing to install dependencies..."
if [[ -x $(command -v apt) && -f /opt/procursus/.procursus_strapped ]]; then
sudo apt update
sudo apt install -y ldid xz-utils \
&& update "Dependencies have been successfully installed!" \
|| (error "Dependency install command seems to have encountered an error. Please see the log above."; exit 3)
elif [[ -x $(command -v port) ]]; then
sudo port selfupdate
yes | sudo port install ldid xz \
&& update "Dependencies have been successfully installed!" \
|| (error "Dependency install command seems to have encountered an error. Please see the log above."; exit 3)
elif [[ -x $(command -v brew) ]]; then
brew update
brew install ldid xz \
&& update "Dependencies have been successfully installed!" \
|| (error "Dependency install command seems to have encountered an error. Please see the log above."; exit 3)
else
read -p "Homebrew, which provides tools Theos depends on, is not installed. Would you like to have it installed for you? [y/n]" hbrew
if theos_bool $hbrew; then
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" \
&& update "Homebrew has been successfully installed!" \
|| (error "Homebrew install command seems to have encountered an error. Please see the log above."; exit 3)
brew install ldid xz \
&& update "Dependencies have been successfully installed!" \
|| (error "Dependency install command seems to have encountered an error. Please see the log above."; exit 3)
else
error "Homebrew provides tools Theos depends on and thus is mandatory. Please install Homebrew before proceeding with the installation."
exit 3
fi
fi
set_theos
get_theos
get_sdks
}
darwin_mobile() {
# Categorize iOS version
# Earlier than iOS 12 is old!
# https://www.theiphonewiki.com/wiki/Kernel
LEGACY=0
KERNEL_VER=$(sysctl kern.osrelease | sed 's/[^0-9]*//g')
if [[ $KERNEL_VER < 1800 ]]; then
LEGACY=1
fi
# Check for sudo (not installed by default on some jbs)
if ! [[ -x $(command -v sudo) ]]; then
error "Please install 'sudo' in your package manager before proceeding with the installation."
exit 3
fi
# Dependencies
update "Preparing to install dependencies. Please enter your password if prompted:"
if [[ $LEGACY -eq 1 ]]; then
read -p "Do you have 'https://coolstar.org/publicrepo/', 'https://repo.bingner.com/', and 'http://apt.thebigboss.org/repofiles/cydia/' installed in the sources of your jailbreak's primary package manager? [y/n]" ready
if theos_bool $ready; then
sudo apt-get update --allow-insecure-repositories
sudo apt-get install -y --allow-unauthenticated --allow-downgrades org.theos.dependencies \
&& update "Dependencies have been successfully installed!" \
|| (error "Dependency install command seems to have encountered an error. Please see the log above."; exit 3)
else
error "Please install the repos mentioned above before proceeding."
exit 3
fi
else
# Up-to-date dependencies pkg is exclusive to Procursus, so need to cater install accordingly
if [[ -f /.procursus_strapped ]]; then
read -p "Do you have 'https://apt.procursus.us' installed in the sources of your jailbreak's primary package manager? [y/n]" ready
if theos_bool $ready; then
sudo apt update --allow-insecure-repositories
sudo apt install --allow-downgrades theos-dependencies \
&& update "Dependencies have been successfully installed!" \
|| (error "Dependency install command seems to have encountered an error. Please see the log above."; exit 3)
else
error "Please install the repo mentioned above before proceeding."
exit 3
fi
else
read -p "Do you have 'https://apt.bingner.com' installed in the sources of your jailbreak's primary package manager? [y/n]" ready
if theos_bool $ready; then
sudo apt update --allow-insecure-repositories
sudo apt install -y --allow-downgrades ca-certificates clang coreutils curl dpkg git grep ldid make odcctools perl com.bingner.plutil rsync xz \
&& update "Dependencies have been successfully installed!" \
|| (error "Dependency install command seems to have encountered an error. Please see the log above."; exit 3)
else
error "Please install the repo mentioned above before proceeding."
exit 3
fi
fi
fi
# Check desire for Swift support
update "Checking desire for Swift support..."
read -p "Would you like to be able to work with Swift? If so, an additional package will need to be installed. [y/n]" confirm
if theos_bool $confirm; then
if [[ -f /.procursus_strapped ]]; then
sudo apt install -y --allow-downgrades swift \
&& update "Additional Swift package installation successful!" \
|| (error "Additional Swift package install command seems to have encountered an error. Please see the log above."; exit 3)
else
sudo apt install -y --allow-downgrades com.kabiroberai.swift-toolchain \
&& update "Additional Swift package installation successful!" \
|| (error "Additional Swift package install command seems to have encountered an error. Please see the log above."; exit 3)
fi
else
update "Skipping Swift support."
common "Note: if you end up wanting to use Swift in the future, just install the 'swift' (Procursus ONLY) or 'swift-toolchain' (all other bootstraps) packages from within your package manager."
fi
set_theos
get_theos
get_sdks
}
linux() {
# Determine distro
DISTRO="unknown"
if [[ -x $(command -v apt) ]]; then
DISTRO="debian"
elif [[ -x $(command -v pacman) ]]; then
DISTRO="arch"
elif [[ -x $(command -v dnf) ]]; then
DISTRO="redhat"
elif [[ -x $(command -v zypper) ]]; then
DISTRO="suse"
fi
# Check for sudo (not installed by default on some distros)
if ! [[ -x $(command -v sudo) ]]; then
error "Please install 'sudo' before proceeding with the installation."
exit 3
fi
# Dependencies
update "Preparing to install dependencies. Please enter your password if prompted:"
case $DISTRO in
debian)
sudo apt update
sudo apt install -y build-essential fakeroot rsync curl perl zip git libxml2 \
&& update "Dependencies have been successfully installed!" \
|| (error "Dependency install command seems to have encountered an error. Please see the log above."; exit 3)
;;
arch)
sudo pacman -Syy
sudo pacman -S --needed --noconfirm base-devel libbsd fakeroot openssl rsync curl perl zip git libxml2 \
&& update "Dependencies have been successfully installed!" \
|| (error "Dependency install command seems to have encountered an error. Please see the log above."; exit 3)
;;
redhat)
sudo dnf check-update
sudo dnf group install -y "C Development Tools and Libraries" \
&& update "Dependencies have been successfully installed!" \
|| (error "Dependency install command seems to have encountered an error. Please see the log above."; exit 3)
sudo dnf install -y fakeroot lzma libbsd rsync curl perl zip git libxml2 \
&& update "Other dependencies have been successfully installed!" \
|| (error "Other dependency install command seems to have encountered an error. Please see the log above."; exit 3)
;;
suse)
sudo zypper refresh
sudo zypper install -y -t pattern devel_basis \
&& update "Dependencies have been successfully installed!" \
|| (error "Dependency install command seems to have encountered an error. Please see the log above."; exit 3)
sudo zypper install -y fakeroot libbsd0 rsync curl perl zip git libxml2 \
&& update "Other dependencies have been successfully installed!" \
|| (error "Other dependency install command seems to have encountered an error. Please see the log above."; exit 3)
;;
*)
error "The dependencies for your distro are unknown to this installer. Note that they will need to be determined before Theos can be installed and/or function properly."
common "On Debian-based distros, the necessary dependencies are: build-essential fakeroot rsync curl perl git libxml2 and libtinfo5 (non-swift toolchain) or libz3-dev (swift toolchain)."
common "Additional dependencies may also be required depending on what your distro provides."
;;
esac
# Check for WSL
update "Checking for WSL..."
if [[ $(uname -r | sed -n 's/.*\( *Microsoft *\).*/\1/ip') == microsoft ]]; then
VERSION=$(uname -r | sed 's/.*\([[:digit:]]\)[[:space:]]*/\1/')
if [[ $VERSION -eq 1 ]]; then
update "WSL1! Need to fix fakeroot..."
sudo update-alternatives --set fakeroot /usr/bin/fakeroot-tcp \
&& update "fakeroot fixed!" \
|| (error "fakeroot fix seems to have encountered an error. Please see the log above."; exit 10)
else
update "WSL2! Nothing to do here."
fi
else
update "Seems you're not using WSL. Moving on..."
fi
set_theos
get_theos
# Get a toolchain
update "Checking for iOS toolchain..."
if [[ -d $THEOS/toolchain/linux/iphone/ && $(ls -A "$THEOS/toolchain/linux/iphone") ]]; then
update "A toolchain appears to already be installed."
else
update "A toolchain does not appear to be installed."
stoolchain="n"
if [[ $NONINTERACTIVE -eq 0 ]]; then
read -p "Would you like your toolchain to support Swift (larger toolchain size) or not (smaller toolchain size)? [y/n]" stoolchain
fi
if theos_bool $stoolchain; then
case $DISTRO in
debian)
sudo apt install -y libz3-dev zstd
;;
arch)
sudo pacman -S --needed --noconfirm libedit z3 zstd
# libz3-dev equivalent is z3 and we need to create lib version queried
LATEST_LIBZ3="$(ls -v /usr/lib/ | grep libz3 | tail -n 1)"
sudo ln -sf /usr/lib/$LATEST_LIBZ3 /usr/lib/libz3.so.4
# toolchain looks for a specific libedit
LATEST_LIBEDIT="$(ls -v /usr/lib/ | grep libedit | tail -n 1)"
sudo ln -sf /usr/lib/$LATEST_LIBEDIT /usr/lib/libedit.so.2
;;
redhat)
sudo dnf install -y z3-libs zstd
# libz3-dev equivalent is z3-libs and ...
LATEST_LIBZ3="$(ls -v /usr/lib64/ | grep libz3 | tail -n 1)"
sudo ln -sf /usr/lib64/$LATEST_LIBZ3 /usr/lib64/libz3.so.4
# toolchain looks for a specific libedit
LATEST_LIBEDIT="$(ls -v /usr/lib64/ | grep libedit | tail -n 1)"
sudo ln -sf /usr/lib64/$LATEST_LIBEDIT /usr/lib64/libedit.so.2
;;
suse)
sudo zypper install -y $(zypper search libz3 | tail -n 1 | cut -d "|" -f2) zstd
# libz3-dev equivalent is libz3-* and ...
LATEST_LIBZ3="$(ls -v /usr/lib64/ | grep libz3 | tail -n 1)"
sudo ln -sf /usr/lib64/$LATEST_LIBZ3 /usr/lib64/libz3.so.4
# toolchain looks for a specific libedit
LATEST_LIBEDIT="$(ls -v /usr/lib64/ | grep libedit | tail -n 1)"
sudo ln -sf /usr/lib64/$LATEST_LIBEDIT /usr/lib64/libedit.so.2
;;
esac
curl -LO https://github.com/CRKatri/llvm-project/releases/download/swift-5.3.2-RELEASE/swift-5.3.2-RELEASE-ubuntu20.04.tar.zst
TMP=$(mktemp -d)
tar -xvf swift-5.3.2-RELEASE-ubuntu20.04.tar.zst -C $TMP
mkdir -p $THEOS/toolchain/linux/iphone $THEOS/toolchain/swift
mv $TMP/swift-5.3.2-RELEASE-ubuntu20.04/* $THEOS/toolchain/linux/iphone/
ln -s $THEOS/toolchain/linux/iphone $THEOS/toolchain/swift
rm -r swift-5.3.2-RELEASE-ubuntu20.04.tar.zst $TMP
else
case $DISTRO in
debian)
sudo apt install -y libtinfo5
;;
arch)
# get source for libtinfo5 equivalent from AUR and build
if ! pacman -Qs ncurses5-compat-libs > /dev/null; then
git clone https://aur.archlinux.org/ncurses5-compat-libs.git
cd ncurses5-compat-libs
gpg --recv-keys "$(cat PKGBUILD | grep validpgp | grep -oP "(?<=').*(?=')")"
MAKEFLAGS="-j$(nproc --all)" makepkg -sir --noconfirm \
&& cd .. \
&& rm -rf ncurses5-compat-libs
fi
;;
redhat)
sudo dnf install -y ncurses-compat-libs
;;
suse)
sudo zypper install -y libncurses5
;;
esac
curl -LO https://github.com/sbingner/llvm-project/releases/latest/download/linux-ios-arm64e-clang-toolchain.tar.lzma
TMP=$(mktemp -d)
tar -xvf linux-ios-arm64e-clang-toolchain.tar.lzma -C $TMP
mkdir -p $THEOS/toolchain/linux/iphone
mv $TMP/ios-arm64e-clang-toolchain/* $THEOS/toolchain/linux/iphone/
rm -r linux-ios-arm64e-clang-toolchain.tar.lzma $TMP
fi
# Confirm that toolchain is usable
if [[ -x $THEOS/toolchain/linux/iphone/bin/clang ]]; then
update "Successfully installed the toolchain!"
else
error "Something appears to have gone wrong -- the toolchain is not accessible. Please try again."
exit 7
fi
fi
get_sdks
}
# TODO
# freebsd() {
# # Check for sudo (not installed by default)
# if ! [[ -x $(command -v sudo) ]]; then
# error "Please install 'sudo' before proceeding with the installation."
# exit 3
# fi
# # Dependencies
# update "Preparing to install dependencies. Please enter your password if prompted:"
# sudo pkg update
# sudo pkg install -y bash curl gmake ncurses fakeroot git rsync curl zip \
# && update "Dependencies have been successfully installed!" \
# || (error "Dependency install command seems to have encountered an error. Please see the log above."; exit 3)
# # Enable linux binary compatibility
# update "Enabling Linux binary compatibility..."
# sudo sysrc linux_enable=YES
# sudo service linux start
# sudo pkg install -y linux_base-c7 \
# && update "Linux binary compatibility successfully enabled!" \
# || (error "Linux binary compatibility command seems to have encountered an error. Please see the log above."; exit 11)
# # Compatibility with common Theos commands
# # TODO: Should we be doing this?
# echo "alias make=gmake" >> "$SHELL_ENV"
# set_theos
# get_theos
# # Get a toolchain
# update "Checking for iOS toolchain..."
# if [[ -d $THEOS/toolchain/linux/iphone/ && $(ls -A "$THEOS/toolchain/linux/iphone") ]]; then
# update "A toolchain appears to already be installed."
# else
# update "A toolchain does not appear to be installed."
# stoolchain="n"
# if [[ $NONINTERACTIVE -eq 0 ]]; then
# read -p "Would you like your toolchain to support Swift (larger toolchain size) or not (smaller toolchain size)? [y/n]" stoolchain
# fi
# if theos_bool $stoolchain; then
# sudo pkg install -y zstd
# curl -LO https://github.com/CRKatri/llvm-project/releases/download/swift-5.3.2-RELEASE/swift-5.3.2-RELEASE-ubuntu20.04.tar.zst
# TMP=$(mktemp -d)
# tar -xvf swift-5.3.2-RELEASE-ubuntu20.04.tar.zst -C $TMP
# mkdir -p $THEOS/toolchain/linux/iphone $THEOS/toolchain/swift
# mv $TMP/swift-5.3.2-RELEASE-ubuntu20.04/* $THEOS/toolchain/linux/iphone/
# ln -s $THEOS/toolchain/linux/iphone $THEOS/toolchain/swift
# rm -r swift-5.3.2-RELEASE-ubuntu20.04.tar.zst $TMP
# else
# curl -LO https://github.com/sbingner/llvm-project/releases/latest/download/linux-ios-arm64e-clang-toolchain.tar.lzma
# TMP=$(mktemp -d)
# tar -xvf linux-ios-arm64e-clang-toolchain.tar.lzma -C $TMP
# mkdir -p $THEOS/toolchain/linux/iphone
# mv $TMP/ios-arm64e-clang-toolchain/* $THEOS/toolchain/linux/iphone/
# rm -r linux-ios-arm64e-clang-toolchain.tar.lzma $TMP
# fi
# # Confirm that toolchain is usable
# # TODO: FreeBSD unique toolchain path != /linux/ ?
# if [[ -x $THEOS/toolchain/linux/iphone/bin/clang ]]; then
# update "Successfully installed the toolchain!"
# else
# error "Something appears to have gone wrong -- the toolchain is not accessible. Please try again."
# exit 7
# fi
# fi
# get_sdks
# }
# Determine platform and start work
special "Starting install..."
common "Platform: $PLATFORM"
if [[ $PLATFORM == Darwin ]]; then
if [[ -x $(command -v xcode-select) ]]; then
darwin
else
darwin_mobile
fi
elif [[ ${PLATFORM,,} == linux ]]; then
linux
# elif [[ ${PLATFORM,,} == freebsd ]]; then
# freebsd
else
error "'$PLATFORM' is currently unsupported by this installer and/or Theos."
exit 2
fi
special "Theos has been successfully installed! Restart your shell and then run \$THEOS/bin/nic.pl to get started."