Merge branch 'ChrisTitusTech:main' into patch-1
This commit is contained in:
commit
cd87e25839
|
|
@ -6,7 +6,7 @@ jobs:
|
|||
combine-prs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.3
|
||||
- uses: actions/checkout@v3.0.0
|
||||
- uses: maadhattah/combine-dependabot-prs@main
|
||||
with:
|
||||
branchPrefix: "dependabot"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3.0.0
|
||||
- name: Github Action genshdoc
|
||||
id: action-genshdoc
|
||||
uses: vargiuscuola/genshdoc@master
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ jobs:
|
|||
# Checkout the code base #
|
||||
##########################
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3.0.0
|
||||
with:
|
||||
# Full git history is needed to get a proper list of changed files within `super-linter`
|
||||
fetch-depth: 0
|
||||
|
|
|
|||
|
|
@ -1,4 +1,23 @@
|
|||
# Preinstall
|
||||
|
||||
Contains the steps necessary to configure and pacstrap the install to selected drive.
|
||||
|
||||
# Overview
|
||||
|
||||
Creates the btrfs subvolumes.
|
||||
|
||||
|
||||
# Functions
|
||||
* [mountallsubvol()](#mountallsubvol)
|
||||
* [subvolumesetup()](#subvolumesetup)
|
||||
|
||||
|
||||
## mountallsubvol()
|
||||
|
||||
Mount all btrfs subvolumes after root has been mounted.
|
||||
|
||||
## subvolumesetup()
|
||||
|
||||
BTRFS subvolulme creation and mounting.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
# Setup
|
||||
|
||||
Configures installed system, installs base packages, and creates user.
|
||||
|
||||
# Functions
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
# User
|
||||
|
||||
User customizations and AUR package installation.
|
||||
|
||||
# Functions
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
# Post-Setup
|
||||
|
||||
Finalizing installation configurations and cleaning up after script.
|
||||
|
||||
# Functions
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
# ArchTitus
|
||||
|
||||
Entrance script that launches children scripts for each phase of installation.
|
||||
|
||||
# Functions
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,98 @@
|
|||
# Startup
|
||||
|
||||
This script will ask users about their prefrences like disk, file system, timezone, keyboard layout, user name, password, etc.
|
||||
|
||||
# Settings
|
||||
|
||||
## General Settings
|
||||
* **CONFIG_FILE** (string)[default: **$CONFIGS_DIR/setup.conf**]: Location of setup.conf to be used by set_option and all subsequent scripts.
|
||||
|
||||
|
||||
# Functions
|
||||
* [set_option()](#set_option)
|
||||
* [select_option()](#select_option)
|
||||
* [logo()](#logo)
|
||||
* [filesystem()](#filesystem)
|
||||
* [timezone()](#timezone)
|
||||
* [keymap()](#keymap)
|
||||
* [drivessd()](#drivessd)
|
||||
* [diskpart()](#diskpart)
|
||||
* [userinfo()](#userinfo)
|
||||
* [aurhelper()](#aurhelper)
|
||||
* [desktopenv()](#desktopenv)
|
||||
* [installtype()](#installtype)
|
||||
|
||||
|
||||
## set_option()
|
||||
|
||||
set options in setup.conf
|
||||
|
||||
### Output on stdout
|
||||
|
||||
* Output routed to startup.log
|
||||
|
||||
### Output on stderr
|
||||
|
||||
* # @stderror Output routed to startup.log
|
||||
|
||||
### Arguments
|
||||
|
||||
* **$1** (string): Configuration variable.
|
||||
|
||||
### Arguments
|
||||
|
||||
* **$2** (string): Configuration value.
|
||||
|
||||
## select_option()
|
||||
|
||||
Renders a text based list of options that can be selected by the
|
||||
user using up, down and enter keys and returns the chosen option.
|
||||
|
||||
Arguments : list of options, maximum of 256
|
||||
"opt1" "opt2" ...
|
||||
Return value: selected index (0 for opt1, 1 for opt2 ...)
|
||||
|
||||
## logo()
|
||||
|
||||
Displays ArchTitus logo
|
||||
|
||||
_Function has no arguments._
|
||||
|
||||
## filesystem()
|
||||
|
||||
This function will handle file systems. At this movement we are handling only
|
||||
btrfs and ext4. Others will be added in future.
|
||||
|
||||
## timezone()
|
||||
|
||||
Detects and sets timezone.
|
||||
|
||||
## keymap()
|
||||
|
||||
Set user's keyboard mapping.
|
||||
|
||||
## drivessd()
|
||||
|
||||
Choose whether drive is SSD or not.
|
||||
|
||||
## diskpart()
|
||||
|
||||
Disk selection for drive to be used with installation.
|
||||
|
||||
## userinfo()
|
||||
|
||||
Gather username and password to be used for installation.
|
||||
|
||||
## aurhelper()
|
||||
|
||||
Choose AUR helper.
|
||||
|
||||
## desktopenv()
|
||||
|
||||
Choose Desktop Environment
|
||||
|
||||
## installtype()
|
||||
|
||||
Choose whether to do full or minimal installation.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
#github-action genshdoc
|
||||
#
|
||||
# @file ArchTitus
|
||||
# @brief Entrance script that launches children scripts for each phase of installation.
|
||||
|
||||
# Find the name of the folder the scripts are in
|
||||
set -a
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@
|
|||
# ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
||||
#-------------------------------------------------------------------------
|
||||
#github-action genshdoc
|
||||
|
||||
#
|
||||
# @file Preinstall
|
||||
# @brief Contains the steps necessary to configure and pacstrap the install to selected drive.
|
||||
echo -ne "
|
||||
-------------------------------------------------------------------------
|
||||
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
||||
|
|
@ -70,6 +72,7 @@ echo -ne "
|
|||
Creating Filesystems
|
||||
-------------------------------------------------------------------------
|
||||
"
|
||||
# @description Creates the btrfs subvolumes.
|
||||
createsubvolumes () {
|
||||
btrfs subvolume create /mnt/@
|
||||
btrfs subvolume create /mnt/@home
|
||||
|
|
@ -78,6 +81,7 @@ createsubvolumes () {
|
|||
btrfs subvolume create /mnt/@.snapshots
|
||||
}
|
||||
|
||||
# @description Mount all btrfs subvolumes after root has been mounted.
|
||||
mountallsubvol () {
|
||||
mount -o ${MOUNT_OPTIONS},subvol=@home ${partition3} /mnt/home
|
||||
mount -o ${MOUNT_OPTIONS},subvol=@tmp ${partition3} /mnt/tmp
|
||||
|
|
@ -85,6 +89,7 @@ mountallsubvol () {
|
|||
mount -o ${MOUNT_OPTIONS},subvol=@.snapshots ${partition3} /mnt/.snapshots
|
||||
}
|
||||
|
||||
# @description BTRFS subvolulme creation and mounting.
|
||||
subvolumesetup () {
|
||||
# create nonroot subvolumes
|
||||
createsubvolumes
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
#github-action genshdoc
|
||||
#
|
||||
# @file Setup
|
||||
# @brief Configures installed system, installs base packages, and creates user.
|
||||
echo -ne "
|
||||
-------------------------------------------------------------------------
|
||||
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
#github-action genshdoc
|
||||
#
|
||||
# @file User
|
||||
# @brief User customizations and AUR package installation.
|
||||
echo -ne "
|
||||
-------------------------------------------------------------------------
|
||||
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
#github-action genshdoc
|
||||
#
|
||||
# @file Post-Setup
|
||||
# @brief Finalizing installation configurations and cleaning up after script.
|
||||
echo -ne "
|
||||
-------------------------------------------------------------------------
|
||||
█████╗ ██████╗ ██████╗██╗ ██╗████████╗██╗████████╗██╗ ██╗███████╗
|
||||
|
|
|
|||
|
|
@ -1,23 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
#github-action genshdoc
|
||||
# This script will ask users about their prefrences
|
||||
# like disk, file system, timezone, keyboard layout,
|
||||
# user name, password, etc.
|
||||
#
|
||||
# @file Startup
|
||||
# @brief This script will ask users about their prefrences like disk, file system, timezone, keyboard layout, user name, password, etc.
|
||||
# @stdout Output routed to startup.log
|
||||
# @stderror Output routed to startup.log
|
||||
|
||||
# set up a config file
|
||||
# @setting-header General Settings
|
||||
# @setting CONFIG_FILE string[$CONFIGS_DIR/setup.conf] Location of setup.conf to be used by set_option and all subsequent scripts.
|
||||
CONFIG_FILE=$CONFIGS_DIR/setup.conf
|
||||
if [ ! -f $CONFIG_FILE ]; then # check if file exists
|
||||
touch -f $CONFIG_FILE # create file if not exists
|
||||
fi
|
||||
|
||||
# set options in setup.conf
|
||||
# @description set options in setup.conf
|
||||
# @arg $1 string Configuration variable.
|
||||
# @arg $2 string Configuration value.
|
||||
set_option() {
|
||||
if grep -Eq "^${1}.*" $CONFIG_FILE; then # check if option exists
|
||||
sed -i -e "/^${1}.*/d" $CONFIG_FILE # delete option if exists
|
||||
fi
|
||||
echo "${1}=${2}" >>$CONFIG_FILE # add option
|
||||
}
|
||||
# Renders a text based list of options that can be selected by the
|
||||
# @description Renders a text based list of options that can be selected by the
|
||||
# user using up, down and enter keys and returns the chosen option.
|
||||
#
|
||||
# Arguments : list of options, maximum of 256
|
||||
|
|
@ -126,6 +131,8 @@ select_option() {
|
|||
|
||||
return $(( $active_col + $active_row * $colmax ))
|
||||
}
|
||||
# @description Displays ArchTitus logo
|
||||
# @noargs
|
||||
logo () {
|
||||
# This will be shown on every set as user is progressing
|
||||
echo -ne "
|
||||
|
|
@ -141,9 +148,9 @@ echo -ne "
|
|||
------------------------------------------------------------------------
|
||||
"
|
||||
}
|
||||
filesystem () {
|
||||
# This function will handle file systems. At this movement we are handling only
|
||||
# @description This function will handle file systems. At this movement we are handling only
|
||||
# btrfs and ext4. Others will be added in future.
|
||||
filesystem () {
|
||||
echo -ne "
|
||||
Please Select your file system for both boot and root
|
||||
"
|
||||
|
|
@ -174,6 +181,7 @@ done
|
|||
*) echo "Wrong option please select again"; filesystem;;
|
||||
esac
|
||||
}
|
||||
# @description Detects and sets timezone.
|
||||
timezone () {
|
||||
# Added this from arch wiki https://wiki.archlinux.org/title/System_time
|
||||
time_zone="$(curl --fail https://ipapi.co/timezone)"
|
||||
|
|
@ -196,6 +204,7 @@ case ${options[$?]} in
|
|||
*) echo "Wrong option. Try again";timezone;;
|
||||
esac
|
||||
}
|
||||
# @description Set user's keyboard mapping.
|
||||
keymap () {
|
||||
echo -ne "
|
||||
Please select key board layout from this list"
|
||||
|
|
@ -209,6 +218,7 @@ echo -ne "Your key boards layout: ${keymap} \n"
|
|||
set_option KEYMAP $keymap
|
||||
}
|
||||
|
||||
# @description Choose whether drive is SSD or not.
|
||||
drivessd () {
|
||||
echo -ne "
|
||||
Is this an ssd? yes/no:
|
||||
|
|
@ -226,7 +236,7 @@ case ${options[$?]} in
|
|||
esac
|
||||
}
|
||||
|
||||
# selection for disk type
|
||||
# @description Disk selection for drive to be used with installation.
|
||||
diskpart () {
|
||||
echo -ne "
|
||||
------------------------------------------------------------------------
|
||||
|
|
@ -249,6 +259,8 @@ echo -e "\n${disk%|*} selected \n"
|
|||
|
||||
drivessd
|
||||
}
|
||||
|
||||
# @description Gather username and password to be used for installation.
|
||||
userinfo () {
|
||||
read -p "Please enter your username: " username
|
||||
set_option USERNAME ${username,,} # convert to lower case as in issue #109
|
||||
|
|
@ -270,6 +282,7 @@ read -rep "Please enter your hostname: " nameofmachine
|
|||
set_option NAME_OF_MACHINE $nameofmachine
|
||||
}
|
||||
|
||||
# @description Choose AUR helper.
|
||||
aurhelper () {
|
||||
# Let the user choose AUR helper from predefined list
|
||||
echo -ne "Please enter your desired AUR helper:\n"
|
||||
|
|
@ -279,6 +292,7 @@ aurhelper () {
|
|||
set_option AUR_HELPER $aur_helper
|
||||
}
|
||||
|
||||
# @description Choose Desktop Environment
|
||||
desktopenv () {
|
||||
# Let the user choose Desktop Enviroment from predefined list
|
||||
echo -ne "Please select your desired Desktop Enviroment:\n"
|
||||
|
|
@ -288,6 +302,7 @@ desktopenv () {
|
|||
set_option DESKTOP_ENV $desktop_env
|
||||
}
|
||||
|
||||
# @description Choose whether to do full or minimal installation.
|
||||
installtype () {
|
||||
echo -ne "Please select type of installation:\n\n
|
||||
Full install: Installs full featured desktop enviroment, with added apps and themes needed for everyday use\n
|
||||
|
|
|
|||
Loading…
Reference in New Issue