bootstrap.sh: Pedantic naming and capitalization fixes
This commit is contained in:
parent
fab7d9d3d9
commit
378545441a
88
bootstrap.sh
88
bootstrap.sh
|
@ -6,13 +6,13 @@
|
||||||
banner()
|
banner()
|
||||||
{
|
{
|
||||||
echo "|------------------------------------------|"
|
echo "|------------------------------------------|"
|
||||||
echo "|----- Welcome to the redox bootstrap -----|"
|
echo "|----- Welcome to the Redox bootstrap -----|"
|
||||||
echo "|------------------------------------------|"
|
echo "|------------------------------------------|"
|
||||||
}
|
}
|
||||||
|
|
||||||
###################################################################################
|
###################################################################################
|
||||||
# This function takes care of installing a dependency via package manager of choice
|
# This function takes care of installing a dependency via package manager of choice
|
||||||
# for building redox on BSDs (MacOS, FreeBSD, etc.).
|
# for building Redox on BSDs (macOS, FreeBSD, etc.).
|
||||||
# @params: $1 package manager
|
# @params: $1 package manager
|
||||||
# $2 package name
|
# $2 package name
|
||||||
# $3 binary name (optional)
|
# $3 binary name (optional)
|
||||||
|
@ -57,14 +57,14 @@ install_freebsd_pkg()
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This function checks which of the supported package managers
|
# This function checks which of the supported package managers
|
||||||
# is available on the OSX Host.
|
# is available on the macOS host.
|
||||||
# If a supported package manager is found, it delegates the installing work to
|
# If a supported package manager is found, it delegates the installing work to
|
||||||
# the relevant function.
|
# the relevant function.
|
||||||
# Otherwise this function will exit this script with an error.
|
# Otherwise this function will exit this script with an error.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
osx()
|
osx()
|
||||||
{
|
{
|
||||||
echo "Detected OSX!"
|
echo "Detected macOS!"
|
||||||
|
|
||||||
if [ ! -z "$(which brew)" ]; then
|
if [ ! -z "$(which brew)" ]; then
|
||||||
osx_homebrew $@
|
osx_homebrew $@
|
||||||
|
@ -80,12 +80,12 @@ osx()
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This function takes care of installing all dependencies using MacPorts
|
# This function takes care of installing all dependencies using MacPorts
|
||||||
# for building redox on Mac OSX
|
# for building Redox on macOS
|
||||||
# @params: $1 the emulator to install, virtualbox or qemu
|
# @params: $1 the emulator to install, "virtualbox" or "qemu"
|
||||||
###############################################################################
|
###############################################################################
|
||||||
osx_macports()
|
osx_macports()
|
||||||
{
|
{
|
||||||
echo "Macports detected! Now updating..."
|
echo "MacPorts detected! Now updating..."
|
||||||
sudo port -v selfupdate
|
sudo port -v selfupdate
|
||||||
|
|
||||||
echo "Installing missing packages..."
|
echo "Installing missing packages..."
|
||||||
|
@ -110,8 +110,8 @@ osx_macports()
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This function takes care of installing all dependencies using Homebrew
|
# This function takes care of installing all dependencies using Homebrew
|
||||||
# for building redox on Mac OSX
|
# for building Redox on macOS
|
||||||
# @params: $1 the emulator to install, virtualbox or qemu
|
# @params: $1 the emulator to install, "virtualbox" or "qemu"
|
||||||
###############################################################################
|
###############################################################################
|
||||||
osx_homebrew()
|
osx_homebrew()
|
||||||
{
|
{
|
||||||
|
@ -144,8 +144,8 @@ osx_homebrew()
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This function takes care of installing all dependencies using pkg
|
# This function takes care of installing all dependencies using pkg
|
||||||
# for building redox on FreeBSD
|
# for building Redox on FreeBSD
|
||||||
# @params: $1 the emulator to install, virtualbox or qemu
|
# @params: $1 the emulator to install, "virtualbox" or "qemu"
|
||||||
###############################################################################
|
###############################################################################
|
||||||
freebsd()
|
freebsd()
|
||||||
{
|
{
|
||||||
|
@ -180,9 +180,9 @@ freebsd()
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This function takes care of installing all dependencies for building redox on
|
# This function takes care of installing all dependencies for building Redox on
|
||||||
# Arch linux
|
# Arch Linux
|
||||||
# @params: $1 the emulator to install, virtualbox or qemu
|
# @params: $1 the emulator to install, "virtualbox" or "qemu"
|
||||||
###############################################################################
|
###############################################################################
|
||||||
archLinux()
|
archLinux()
|
||||||
{
|
{
|
||||||
|
@ -206,9 +206,9 @@ archLinux()
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This function takes care of installing all dependencies for building redox on
|
# This function takes care of installing all dependencies for building Redox on
|
||||||
# debian based linux
|
# Debian-based Linux
|
||||||
# @params: $1 the emulator to install, virtualbox or qemu
|
# @params: $1 the emulator to install, "virtualbox" or "qemu"
|
||||||
# $2 the package manager to use
|
# $2 the package manager to use
|
||||||
###############################################################################
|
###############################################################################
|
||||||
ubuntu()
|
ubuntu()
|
||||||
|
@ -252,18 +252,18 @@ ubuntu()
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ -z "$(which virtualbox)" ]; then
|
if [ -z "$(which virtualbox)" ]; then
|
||||||
echo "Installing Virtualbox..."
|
echo "Installing VirtualBox..."
|
||||||
sudo "$2" install virtualbox
|
sudo "$2" install virtualbox
|
||||||
else
|
else
|
||||||
echo "Virtualbox already installed!"
|
echo "VirtualBox already installed!"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This function takes care of installing all dependencies for building redox on
|
# This function takes care of installing all dependencies for building Redox on
|
||||||
# fedora linux
|
# Fedora Linux
|
||||||
# @params: $1 the emulator to install, virtualbox or qemu
|
# @params: $1 the emulator to install, "virtualbox" or "qemu"
|
||||||
###############################################################################
|
###############################################################################
|
||||||
fedora()
|
fedora()
|
||||||
{
|
{
|
||||||
|
@ -281,10 +281,10 @@ fedora()
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ -z "$(which virtualbox)" ]; then
|
if [ -z "$(which virtualbox)" ]; then
|
||||||
echo "Installing virtualbox..."
|
echo "Installing VirtualBox..."
|
||||||
sudo dnf install virtualbox
|
sudo dnf install virtualbox
|
||||||
else
|
else
|
||||||
echo "Virtualbox already installed!"
|
echo "VirtualBox already installed!"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# Use rpm -q <package> to check if it's already installed
|
# Use rpm -q <package> to check if it's already installed
|
||||||
|
@ -298,9 +298,9 @@ fedora()
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# This function takes care of installing all dependencies for building redox on
|
# This function takes care of installing all dependencies for building Redox on
|
||||||
# *suse linux
|
# *SUSE Linux
|
||||||
# @params: $1 the emulator to install, virtualbox or qemu
|
# @params: $1 the emulator to install, "virtualbox" or "qemu"
|
||||||
###############################################################################
|
###############################################################################
|
||||||
suse()
|
suse()
|
||||||
{
|
{
|
||||||
|
@ -318,11 +318,11 @@ suse()
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ -z "$(which virtualbox)" ]; then
|
if [ -z "$(which virtualbox)" ]; then
|
||||||
echo "Please install Virtualbox and re-run this script,"
|
echo "Please install VirtualBox and re-run this script,"
|
||||||
echo "or run with -e qemu"
|
echo "or run with -e qemu"
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
echo "Virtualbox already installed!"
|
echo "VirtualBox already installed!"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo "Installing necessary build tools..."
|
echo "Installing necessary build tools..."
|
||||||
|
@ -330,9 +330,9 @@ suse()
|
||||||
}
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# This function takes care of installing all dependencies for building redox on
|
# This function takes care of installing all dependencies for building Redox on
|
||||||
# gentoo linux
|
# Gentoo Linux
|
||||||
# @params: $1 the emulator to install, virtualbox or qemu
|
# @params: $1 the emulator to install, "virtualbox" or "qemu"
|
||||||
##############################################################################
|
##############################################################################
|
||||||
gentoo()
|
gentoo()
|
||||||
{
|
{
|
||||||
|
@ -365,13 +365,13 @@ gentoo()
|
||||||
}
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# This function takes care of installing all dependencies for building redox on
|
# This function takes care of installing all dependencies for building Redox on
|
||||||
# SolusOS
|
# Solus
|
||||||
# @params: $1 the emulator to install, virtualbox or qemu
|
# @params: $1 the emulator to install, "virtualbox" or "qemu"
|
||||||
##############################################################################
|
##############################################################################
|
||||||
solus()
|
solus()
|
||||||
{
|
{
|
||||||
echo "Detected SolusOS"
|
echo "Detected Solus"
|
||||||
|
|
||||||
if [ "$1" == "qemu" ]; then
|
if [ "$1" == "qemu" ]; then
|
||||||
if [ -z "$(which qemu-system-x86_64)" ]; then
|
if [ -z "$(which qemu-system-x86_64)" ]; then
|
||||||
|
@ -381,11 +381,11 @@ solus()
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ -z "$(which virtualbox)" ]; then
|
if [ -z "$(which virtualbox)" ]; then
|
||||||
echo "Please install Virtualbox and re-run this script,"
|
echo "Please install VirtualBox and re-run this script,"
|
||||||
echo "or run with -e qemu"
|
echo "or run with -e qemu"
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
echo "Virtualbox already installed!"
|
echo "VirtualBox already installed!"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -479,7 +479,7 @@ rustInstall() {
|
||||||
echo "\#curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly"
|
echo "\#curl -sSf https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly"
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
echo "Your rust install looks good!"
|
echo "Your Rust install looks good!"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -530,12 +530,12 @@ boot()
|
||||||
echo "Well it looks like you are ready to go!"
|
echo "Well it looks like you are ready to go!"
|
||||||
echo "---------------------------------------"
|
echo "---------------------------------------"
|
||||||
statusCheck
|
statusCheck
|
||||||
echo "Run the following commands to build redox:"
|
echo "Run the following commands to build Redox:"
|
||||||
echo "cd redox"
|
echo "cd redox"
|
||||||
MAKE="make"
|
MAKE="make"
|
||||||
if [[ "$(uname)" == "FreeBSD" ]]; then
|
if [[ "$(uname)" == "FreeBSD" ]]; then
|
||||||
MAKE="gmake"
|
MAKE="gmake"
|
||||||
echo "kldload fuse.ko # This loads the kernel module for fuse"
|
echo "kldload fuse.ko # This loads the kernel module for FUSE"
|
||||||
fi
|
fi
|
||||||
echo "$MAKE all"
|
echo "$MAKE all"
|
||||||
echo "$MAKE virtualbox or qemu"
|
echo "$MAKE virtualbox or qemu"
|
||||||
|
@ -590,7 +590,7 @@ if [ "Darwin" == "$(uname -s)" ]; then
|
||||||
else
|
else
|
||||||
# Here we will use package managers to determine which operating system the user is using.
|
# Here we will use package managers to determine which operating system the user is using.
|
||||||
|
|
||||||
# Suse and derivatives
|
# SUSE and derivatives
|
||||||
if hash 2>/dev/null zypper; then
|
if hash 2>/dev/null zypper; then
|
||||||
suse "$emulator"
|
suse "$emulator"
|
||||||
# Debian or any derivative of it
|
# Debian or any derivative of it
|
||||||
|
@ -602,10 +602,10 @@ else
|
||||||
# Gentoo
|
# Gentoo
|
||||||
elif hash 2>/dev/null emerge; then
|
elif hash 2>/dev/null emerge; then
|
||||||
gentoo "$emulator"
|
gentoo "$emulator"
|
||||||
# SolusOS
|
# Solus
|
||||||
elif hash 2>/dev/null eopkg; then
|
elif hash 2>/dev/null eopkg; then
|
||||||
solus "$emulator"
|
solus "$emulator"
|
||||||
# Arch linux
|
# Arch Linux
|
||||||
elif hash 2>/dev/null pacman; then
|
elif hash 2>/dev/null pacman; then
|
||||||
archLinux "$emulator"
|
archLinux "$emulator"
|
||||||
# FreeBSD
|
# FreeBSD
|
||||||
|
|
Loading…
Reference in a new issue