bootstrap.sh 17.7 KB
Newer Older
Jeremy Soller's avatar
Jeremy Soller committed
1
2
3
4
5
6
#! /bin/bash

##########################################################
# This function is simply a banner to introduce the script
##########################################################
banner()
Jeremy Soller's avatar
Jeremy Soller committed
7
{
Jeremy Soller's avatar
Jeremy Soller committed
8
9
10
11
12
	echo "|------------------------------------------|"
	echo "|----- Welcome to the redox bootstrap -----|"
	echo "|------------------------------------------|"
}

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
###################################################################################
# This function takes care of installing a dependency via package manager of choice
# for building redox on MacOS.
# @params:    $1 package manager
#            $2 package name
#            $3 binary name (optional)
###################################################################################
install_macos_pkg()
{
    PKG_MANAGER=$1
    PKG_NAME=$2
    BIN_NAME=$3
    if [ -z "$BIN_NAME" ]; then
        BIN_NAME=$PKG_NAME
    fi

Adrian Neumann's avatar
Adrian Neumann committed
29
    BIN_LOCATION=$(which $BIN_NAME || true)
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
    if [ -z "$BIN_LOCATION" ]; then
        echo "$PKG_MANAGER install $PKG_NAME"
        $PKG_MANAGER install "$PKG_NAME"
    else
        echo "$BIN_NAME already exists at $BIN_LOCATION, no need to install $PKG_NAME..."
    fi
}

install_macports_pkg()
{
    install_macos_pkg "sudo port" "$1" "$2"
}

install_brew_pkg()
{
    install_macos_pkg "brew" $@
}

install_brew_cask_pkg()
{
    install_macos_pkg "brew cask" $@
}

Jeremy Soller's avatar
Jeremy Soller committed
53
###############################################################################
54
55
# This function checks which of the supported package managers
# is available on the OSX Host.
Martin Lindhe's avatar
Martin Lindhe committed
56
# If a supported package manager is found, it delegates the installing work to
57
58
# the relevant function.
# Otherwise this function will exit this script with an error.
Jeremy Soller's avatar
Jeremy Soller committed
59
60
61
###############################################################################
osx()
{
62
63
64
65
66
67
68
    echo "Detected OSX!"

    if [ ! -z "$(which brew)" ]; then
        osx_homebrew $@
    elif [ ! -z "$(which port)" ]; then
        osx_macports $@
    else
Martin Lindhe's avatar
Martin Lindhe committed
69
        echo "Please install either Homebrew or MacPorts, if you wish to use this script"
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
        echo "Re-run this script once you installed one of those package managers"
        echo "Will not install, now exiting..."
        exit 1
    fi
}

###############################################################################
# This function takes care of installing all dependencies using MacPorts
# for building redox on Mac OSX
# @params:    $1 the emulator to install, virtualbox or qemu
###############################################################################
osx_macports()
{
    echo "Macports detected! Now updating..."
    sudo port -v selfupdate

    echo "Installing missing packages..."

    install_macports_pkg "git"

    if [ "$1" == "qemu" ]; then
        install_macports_pkg "qemu" "qemu-system-x86_64"
    else
        install_macports_pkg "virtualbox"
    fi

96
97
    install_macports_pkg "coreutils"
    install_macports_pkg "findutils"
98
99
    install_macports_pkg "gcc49" "gcc-4.9"
    install_macports_pkg "nasm"
100
    install_macports_pkg "pkgconfig"
101
102
    install_macports_pkg "osxfuse"
    install_macports_pkg "x86_64-elf-gcc"
103
    install_macports_pkg "cmake"
104
105
106
}

###############################################################################
Martin Lindhe's avatar
Martin Lindhe committed
107
# This function takes care of installing all dependencies using Homebrew
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# for building redox on Mac OSX
# @params:    $1 the emulator to install, virtualbox or qemu
###############################################################################
osx_homebrew()
{
    echo "Homebrew detected! Now updating..."
    brew update

    echo "Installing missing packages..."

    install_brew_pkg "git"

    if [ "$1" == "qemu" ]; then
        install_brew_pkg "qemu" "qemu-system-x86_64"
    else
        install_brew_pkg "virtualbox"
    fi

126
127
128
129
130
    install_brew_pkg "automake"
    install_brew_pkg "bison"
    install_brew_pkg "gettext"
    install_brew_pkg "libtool"
    install_brew_pkg "make"
131
    install_brew_pkg "nasm"
132
    install_brew_pkg "gcc@7" "gcc-7"
133
    install_brew_pkg "pkg-config"
134
    install_brew_pkg "Caskroom/cask/osxfuse"
135

136
    install_brew_pkg "redox-os/gcc_cross_compilers/x86_64-elf-gcc" "x86_64-elf-gcc"
Jeremy Soller's avatar
Jeremy Soller committed
137
138
139
140
141
142
143
144
145
146
}

###############################################################################
# This function takes care of installing all dependencies for building redox on
# Arch linux
# @params:	$1 the emulator to install, virtualbox or qemu
###############################################################################
archLinux()
{
	echo "Detected Arch Linux"
147
	packages="cmake fuse git gperf perl-html-parser nasm wget texinfo bison flex"
Jeremy Soller's avatar
Jeremy Soller committed
148
	if [ "$1" == "qemu" ]; then
Adam's avatar
Adam committed
149
150
151
		packages="$packages qemu"
	elif [ "$1" == "virtualbox" ]; then
		packages="$packages virtualbox"
Jeremy Soller's avatar
Jeremy Soller committed
152
153
	fi

154
155
156
157
158
159
	# Scripts should not cause a system update in order to just install a couple
	#   of packages. If pacman -S --needed is going to fail, let it fail and the
	#   user will figure out the issues (without updating if required) and rerun
	#   the script.
	#echo "Updating system..."
	#sudo pacman -Syu
Adam's avatar
Adam committed
160
161
162

	echo "Installing packages $packages..."
	sudo pacman -S --needed $packages
Jeremy Soller's avatar
Jeremy Soller committed
163
164
165
166
167
168
}

###############################################################################
# This function takes care of installing all dependencies for building redox on
# debian based linux
# @params:	$1 the emulator to install, virtualbox or qemu
Jeremy Soller's avatar
Jeremy Soller committed
169
# 		$2 the package manager to use
Jeremy Soller's avatar
Jeremy Soller committed
170
171
172
173
174
175
176
###############################################################################
ubuntu()
{
	echo "Detected Ubuntu/Debian"
	echo "Updating system..."
	sudo "$2" update
	echo "Installing required packages..."
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
	sudo "$2" install \
		autoconf \
		autopoint \
		bison \
		build-essential \
		cmake \
		curl \
		file \
		flex \
		fuse \
		genisoimage \
		git \
		gperf \
		libc6-dev-i386 \
		libfuse-dev \
		libhtml-parser-perl \
		libpng-dev \
		libtool \
		m4 \
		nasm \
		pkg-config \
		syslinux-utils \
		texinfo
Jeremy Soller's avatar
Jeremy Soller committed
200
	if [ "$1" == "qemu" ]; then
Jeremy Soller's avatar
Jeremy Soller committed
201
		if [ -z "$(which qemu-system-x86_64)" ]; then
Jeremy Soller's avatar
Jeremy Soller committed
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
			echo "Installing QEMU..."
			sudo "$2" install qemu-system-x86 qemu-kvm
		else
			echo "QEMU already installed!"
		fi
	else
		if [ -z "$(which virtualbox)" ]; then
			echo "Installing Virtualbox..."
			sudo "$2" install virtualbox
		else
			echo "Virtualbox already installed!"
		fi
	fi
}

###############################################################################
# This function takes care of installing all dependencies for building redox on
# fedora linux
# @params:	$1 the emulator to install, virtualbox or qemu
###############################################################################
fedora()
{
	echo "Detected Fedora"
	if [ -z "$(which git)" ]; then
		echo "Installing git..."
msehnout's avatar
msehnout committed
227
		sudo dnf install git-all
Jeremy Soller's avatar
Jeremy Soller committed
228
229
	fi
	if [ "$1" == "qemu" ]; then
Jeremy Soller's avatar
Jeremy Soller committed
230
		if [ -z "$(which qemu-system-x86_64)" ]; then
Jeremy Soller's avatar
Jeremy Soller committed
231
			echo "Installing QEMU..."
msehnout's avatar
msehnout committed
232
			sudo dnf install qemu-system-x86 qemu-kvm
Jeremy Soller's avatar
Jeremy Soller committed
233
234
235
236
237
238
		else
			echo "QEMU already installed!"
		fi
	else
		if [ -z "$(which virtualbox)" ]; then
			echo "Installing virtualbox..."
msehnout's avatar
msehnout committed
239
			sudo dnf install virtualbox
Jeremy Soller's avatar
Jeremy Soller committed
240
241
242
243
		else
			echo "Virtualbox already installed!"
		fi
	fi
244
	# Use rpm -q <package> to check if it's already installed
245
	PKGS=$(for pkg in gcc gcc-c++ glibc-devel.i686 nasm make fuse-devel cmake texinfo gettext-devel bison flex perl-HTML-Parser; do rpm -q $pkg > /dev/null || echo $pkg; done)
246
247
248
249
250
251
	# If the list of packages is not empty, install missing
	COUNT=$(echo $PKGS | wc -w)
	if [ $COUNT -ne 0 ]; then
					echo "Installing necessary build tools..."
					sudo dnf install $PKGS
	fi
Jeremy Soller's avatar
Jeremy Soller committed
252
253
254
255
256
257
258
259
260
}

###############################################################################
# This function takes care of installing all dependencies for building redox on
# *suse linux
# @params:	$1 the emulator to install, virtualbox or qemu
###############################################################################
suse()
{
Martin Lindhe's avatar
Martin Lindhe committed
261
	echo "Detected SUSE Linux"
Jeremy Soller's avatar
Jeremy Soller committed
262
263
264
265
266
	if [ -z "$(which git)" ]; then
		echo "Installing git..."
		zypper install git
	fi
	if [ "$1" == "qemu" ]; then
Jeremy Soller's avatar
Jeremy Soller committed
267
		if [ -z "$(which qemu-system-x86_64)" ]; then
Jeremy Soller's avatar
Jeremy Soller committed
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
			echo "Installing QEMU..."
			sudo zypper install qemu-x86 qemu-kvm
		else
			echo "QEMU already installed!"
		fi
	else
		if [ -z "$(which virtualbox)" ]; then
			echo "Please install Virtualbox and re-run this script,"
			echo "or run with -e qemu"
			exit
		else
			echo "Virtualbox already installed!"
		fi
	fi
	echo "Installing necessary build tools..."
283
	sudo zypper install gcc gcc-c++ glibc-devel-32bit nasm make fuse-devel cmake
Jeremy Soller's avatar
Jeremy Soller committed
284
285
286
}

##############################################################################
Martin Lindhe's avatar
Martin Lindhe committed
287
# This function takes care of installing all dependencies for building redox on
Jeremy Soller's avatar
Jeremy Soller committed
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# gentoo linux
# @params:	$1 the emulator to install, virtualbox or qemu
##############################################################################
gentoo()
{
	echo "Detected Gentoo Linux"
	if [ -z "$(which nasm)" ]; then
		echo "Installing nasm..."
		sudo emerge dev-lang/nasm
	fi
	if [ -z "$(which git)" ]; then
		echo "Installing git..."
		sudo emerge dev-vcs/git
	fi
302
303
304
305
	if [ -z "$(which fusermount)" ]; then
		echo "Installing fuse..."
		sudo emerge sys-fs/fuse
	fi
Jeremy Soller's avatar
Jeremy Soller committed
306
	if [ "$2" == "qemu" ]; then
Jeremy Soller's avatar
Jeremy Soller committed
307
		if [ -z "$(which qemu-system-x86_64)" ]; then
Jeremy Soller's avatar
Jeremy Soller committed
308
			echo "Please install QEMU and re-run this script"
309
			echo "Step1. Add QEMU_SOFTMMU_TARGETS=\"x86_64\" to /etc/portage/make.conf"
Jeremy Soller's avatar
Jeremy Soller committed
310
311
312
313
314
			echo "Step2. Execute \"sudo emerge app-emulation/qemu\""
		else
			echo "QEMU already installed!"
		fi
	fi
315
316
317
318
	if [ -z "$(which cmake)" ]; then
		echo "Installing cmake..."
		sudo emerge dev-util/cmake
	fi
Jeremy Soller's avatar
Jeremy Soller committed
319
320
321
}

##############################################################################
Martin Lindhe's avatar
Martin Lindhe committed
322
# This function takes care of installing all dependencies for building redox on
Jeremy Soller's avatar
Jeremy Soller committed
323
324
325
326
327
328
# SolusOS
# @params:	$1 the emulator to install, virtualbox or qemu
##############################################################################
solus()
{
	echo "Detected SolusOS"
329

Jeremy Soller's avatar
Jeremy Soller committed
330
	if [ "$1" == "qemu" ]; then
Jeremy Soller's avatar
Jeremy Soller committed
331
		if [ -z "$(which qemu-system-x86_64)" ]; then
Jeremy Soller's avatar
Jeremy Soller committed
332
333
334
335
336
337
338
339
340
341
342
343
344
			sudo eopkg it qemu
		else
			echo "QEMU already installed!"
		fi
	else
		if [ -z "$(which virtualbox)" ]; then
			echo "Please install Virtualbox and re-run this script,"
			echo "or run with -e qemu"
			exit
		else
			echo "Virtualbox already installed!"
		fi
	fi
345

346
347
	echo "Installing necessary build tools..."
	#if guards are not necessary with eopkg since it does nothing if latest version is already installed
348
	sudo eopkg it fuse-devel git gcc g++ libgcc-32bit libstdc++-32bit nasm make cmake
Jeremy Soller's avatar
Jeremy Soller committed
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
}

######################################################################
# This function outlines the different options available for bootstrap
######################################################################
usage()
{
	echo "------------------------"
	echo "|Redox bootstrap script|"
	echo "------------------------"
	echo "Usage: ./bootstrap.sh"
	echo "OPTIONS:"
	echo
	echo "   -h,--help      Show this prompt"
	echo "   -u [branch]    Update git repo and update rust"
	echo "                  If blank defaults to master"
	echo "   -s             Check the status of the current travis build"
	echo "   -e [emulator]  Install specific emulator, virtualbox or qemu"
	echo "   -p [package    Choose an Ubuntu package manager, apt-fast or"
	echo "       manager]   aptitude"
Jeremy Soller's avatar
Jeremy Soller committed
369
	echo "   -d             Only install the dependencies, skip boot step"
Jeremy Soller's avatar
Jeremy Soller committed
370
371
	echo "EXAMPLES:"
	echo
372
	echo "./bootstrap.sh -e qemu"
Jeremy Soller's avatar
Jeremy Soller committed
373
374
375
	exit
}

376
377
378
379
380
381
382
383
384
385
386
387

#############################################################
# Looks for and installs a cargo-managed binary or subcommand
#############################################################
cargoInstall() {
	if [[ "`cargo install --list`" != *"$1"* ]]; then
		cargo install $1
	else
		echo "You have $1 installed already!"
	fi
}

Jeremy Soller's avatar
Jeremy Soller committed
388
389
####################################################################################
# This function takes care of everything associated to rust, and the version manager
Jeremy Soller's avatar
Jeremy Soller committed
390
# That controls it, it can install rustup and uninstall multirust as well as making
Jeremy Soller's avatar
Jeremy Soller committed
391
392
393
394
# sure that the correct version of rustc is selected by rustup
####################################################################################
rustInstall() {
	# Check to see if multirust is installed, we don't want it messing with rustup
395
	# In the future we can probably remove this but I believe it's good to have for now
Jeremy Soller's avatar
Jeremy Soller committed
396
397
398
399
400
401
402
	if [ -e /usr/local/lib/rustlib/uninstall.sh ] ; then
		echo "It appears that multirust is installed on your system."
		echo "This tool has been deprecated by the maintainer, and will cause issues."
		echo "This script can remove multirust from your system if you wish."
		printf "Uninstall multirust (y/N):"
		read multirust
		if echo "$multirust" | grep -iq "^y" ;then
Jeremy Soller's avatar
Jeremy Soller committed
403
			sudo /usr/local/lib/rustlib/uninstall.sh
Jeremy Soller's avatar
Jeremy Soller committed
404
405
406
407
408
409
410
		else
			echo "Please manually uninstall multirust and any other versions of rust, then re-run bootstrap."
			exit
		fi
	else
		echo "Old multirust not installed, you are good to go."
	fi
Jeremy Soller's avatar
Jeremy Soller committed
411
	# If rustup is not installed we should offer to install it for them
Jeremy Soller's avatar
Jeremy Soller committed
412
413
	if [ -z "$(which rustup)" ]; then
		echo "You do not have rustup installed."
Martin Lindhe's avatar
Martin Lindhe committed
414
		echo "We HIGHLY recommend using rustup."
Jeremy Soller's avatar
Jeremy Soller committed
415
416
417
418
419
420
421
		echo "Would you like to install it now?"
		echo "*WARNING* this involves a 'curl | sh' style command"
		printf "(y/N): "
		read rustup
		if echo "$rustup" | grep -iq "^y" ;then
			#install rustup
			curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly
Jeremy Soller's avatar
Jeremy Soller committed
422
			# You have to add the rustup variables to the $PATH
Jeremy Soller's avatar
Jeremy Soller committed
423
424
			echo "export PATH=\"\$HOME/.cargo/bin:\$PATH\"" >> ~/.bashrc
			# source the variables so that we can execute rustup commands in the current shell
Jeremy Soller's avatar
Jeremy Soller committed
425
			source ~/.cargo/env
Jeremy Soller's avatar
Jeremy Soller committed
426
427
428
429
			rustup default nightly
		else
			echo "Rustup will not be installed!"
		fi
Jeremy Soller's avatar
Jeremy Soller committed
430
431
	fi
	#
Jeremy Soller's avatar
Jeremy Soller committed
432
433
434
	if [ -z "$(which rustc)" ]; then
		echo "Rust is not installed"
		echo "Please either run the script again, accepting rustup install"
Martin Lindhe's avatar
Martin Lindhe committed
435
		echo "or install rustc nightly manually (not recommended) via:"
Jeremy Soller's avatar
Jeremy Soller committed
436
		echo "\#curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly"
Jeremy Soller's avatar
Jeremy Soller committed
437
		exit
Jeremy Soller's avatar
Jeremy Soller committed
438
439
440
441
442
443
444
445
446
447
	fi
	# If the system has rustup installed then update rustc to the latest nightly
	if hash 2>/dev/null rustup; then
		rustup update nightly
		rustup default nightly
	fi
	# Check to make sure that the default rustc is the nightly
	if echo "$(rustc --version)" | grep -viq "nightly" ;then
		echo "It appears that you have rust installed, but it"
		echo "is not the nightly version, please either install"
Martin Lindhe's avatar
Martin Lindhe committed
448
449
		echo "the nightly manually (not recommended) or run this"
		echo "script again, accepting the rustup install"
Jeremy Soller's avatar
Jeremy Soller committed
450
451
452
453
454
455
456
457
		echo
	else
		echo "Your rust install looks good!"
		echo
	fi
}

####################################################################
Jeremy Soller's avatar
Jeremy Soller committed
458
# This function gets the current build status from travis and prints
Jeremy Soller's avatar
Jeremy Soller committed
459
460
461
462
463
464
465
466
467
# a message to the user
####################################################################
statusCheck() {
	for i in $(echo "$(curl -sf https://api.travis-ci.org/repositories/redox-os/redox.json)" | tr "," "\n")
	do
		if echo "$i" | grep -iq "last_build_status" ;then
			if echo "$i" | grep -iq "0" ;then
				echo
				echo "********************************************"
Martin Lindhe's avatar
Martin Lindhe committed
468
				echo "Travis reports that the last build succeeded!"
Jeremy Soller's avatar
Jeremy Soller committed
469
470
471
472
				echo "Looks like you are good to go!"
				echo "********************************************"
			elif echo "$i" | grep -iq "null" ;then
				echo
Jeremy Soller's avatar
Jeremy Soller committed
473
				echo "******************************************************************"
Jeremy Soller's avatar
Jeremy Soller committed
474
				echo "The Travis build did not finish, this is an error with its config."
Martin Lindhe's avatar
Martin Lindhe committed
475
				echo "I cannot reliably determine whether the build is succeeding or not."
476
				echo "Consider checking for and maybe opening an issue on gitlab"
Jeremy Soller's avatar
Jeremy Soller committed
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
				echo "******************************************************************"
			else
				echo
				echo "**************************************************"
				echo "Travis reports that the last build *FAILED* :("
				echo "Might want to check out the issues before building"
				echo "**************************************************"
			fi
		fi
	done
}

###########################################################################
# This function is the main logic for the bootstrap; it clones the git repo
# then it installs the rust version manager and the latest version of rustc
###########################################################################
boot()
{
495
	echo "Cloning gitlab repo..."
496
	git clone https://gitlab.redox-os.org/redox-os/redox.git --origin upstream --recursive
Jeremy Soller's avatar
Jeremy Soller committed
497
	rustInstall
498
499
	cargoInstall cargo-config
	cargoInstall xargo
Jeremy Soller's avatar
Jeremy Soller committed
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
	echo "Cleaning up..."
	rm bootstrap.sh
	echo
	echo "---------------------------------------"
	echo "Well it looks like you are ready to go!"
	echo "---------------------------------------"
	statusCheck
	echo "Run the following commands to build redox:"
	echo "cd redox"
	echo "make all"
	echo "make virtualbox or qemu"
	echo
	echo "      Good luck!"

	exit
}

517
if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
Jeremy Soller's avatar
Jeremy Soller committed
518
519
	usage
elif [ "$1" == "-u" ]; then
520
	git pull upstream master
Jeremy Soller's avatar
Jeremy Soller committed
521
522
523
524
525
526
527
528
529
530
	git submodule update --recursive --init
	rustup update nightly
	exit
elif [ "$1" == "-s" ]; then
	statusCheck
	exit
fi

emulator="qemu"
defpackman="apt-get"
531
dependenciesonly=false
532
533
update=false
while getopts ":e:p:udhs" opt
Jeremy Soller's avatar
Jeremy Soller committed
534
535
536
537
do
	case "$opt" in
		e) emulator="$OPTARG";;
		p) defpackman="$OPTARG";;
538
		d) dependenciesonly=true;;
539
540
541
		u) update=true;;
		h) usage;;
		s) statusCheck && exit;;
Jeremy Soller's avatar
Jeremy Soller committed
542
543
544
545
		\?) echo "I don't know what to do with that option, try -h for help"; exit;;
	esac
done

546
547
548
549
550
551
552
if [ "$update" == "true" ]; then
	git pull upstream master
	git submodule update --recursive --init
	rustup update nightly
	exit
fi

Jeremy Soller's avatar
Jeremy Soller committed
553
554
555
556
banner
if [ "Darwin" == "$(uname -s)" ]; then
	osx "$emulator"
else
Ken Reese's avatar
Ken Reese committed
557
	# Here we will use package managers to determine which operating system the user is using.
Adam's avatar
Adam committed
558

Jeremy Soller's avatar
Jeremy Soller committed
559
	# Suse and derivatives
560
	if hash 2>/dev/null zypper; then
Jeremy Soller's avatar
Jeremy Soller committed
561
		suse "$emulator"
Ken Reese's avatar
Ken Reese committed
562
563
564
565
566
567
568
569
570
571
572
573
	# Debian or any derivative of it
	elif hash 2>/dev/null apt-get; then
		ubuntu "$emulator" "$defpackman"
	# Fedora
	elif hash 2>/dev/null dnf; then
		fedora "$emulator"
	# Gentoo
	elif hash 2>/dev/null emerge; then
		gentoo "$emulator"
	# SolusOS
	elif hash 2>/dev/null eopkg; then
		solus "$emulator"
574
575
576
	# Arch linux
	elif hash 2>/dev/null pacman; then
		archLinux "$emulator"
Adam's avatar
Adam committed
577
	fi
Jeremy Soller's avatar
Jeremy Soller committed
578
fi
579
580
581
582

if [ "$dependenciesonly" = false ]; then
	boot
fi