Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
cerebrux authored Apr 3, 2022
2 parents 005d938 + c7136cf commit ed8a692
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion archon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#
# Please read the file LICENSE, README and AUTHORS for more information.


########## 1. Variables

##### 1.1 Color Variables
Expand All @@ -26,12 +27,14 @@ NC='\033[0m'
########## 2. Functions

##### 2.1 Filesystem Function

function filesystems(){
if [[ "$is_encrypted" -eq 1 ]]; then
root_partition="/dev/mapper/cryptroot"
else
root_partition="$diskvar""$diskletter""$disknumber"
fi

PS3="Επιλέξτε filesystem: "
options=("ext4" "XFS (experimental)" "Btrfs" "F2FS (experimental)")
select opt in "${options[@]}"
Expand Down Expand Up @@ -108,7 +111,9 @@ function check_if_in_VM() {
sleep 2
}


##### 2.3 Installer Function

function installer() {
echo
echo -e "${IGreen}Εγκατάσταση $1 ...${NC}"
Expand Down Expand Up @@ -279,7 +284,9 @@ function initialize_desktop_selection() {
done
}


##### 2.6 Chroot Function

function chroot_stage {
echo
echo '---------------------------------------------'
Expand Down Expand Up @@ -380,6 +387,7 @@ function chroot_stage {
else
installer "Εγκατάσταση Grub Bootloader" grub os-prober
fi

lsblk --noheadings --raw -o NAME,MOUNTPOINT | awk '$1~/[[:digit:]]/ && $2 == ""' | grep -oP sd\[a-z]\[1-9]+ | sed 's/^/\/dev\//' > disks.txt
filesize=$(stat --printf="%s" disks.txt | tail -n1)

Expand Down Expand Up @@ -553,6 +561,7 @@ function chroot_stage {
}

##### 2.7 Yes or no Function

function YN_Q {
while true; do
read -rp "$1" yes_no
Expand Down Expand Up @@ -588,8 +597,8 @@ while test $# -gt 0; do
esac
done

##### 2.9 Diskchooser Function (Cases for avoiding wrong entries)

##### 2.9 Diskchooser Function (Cases for avoid wrong entries)
function diskchooser() {

lsblk --noheadings --raw | grep disk | awk '{print $1}' > disks
Expand Down Expand Up @@ -649,6 +658,7 @@ function crypt_disk() {
is_encrypted=1
}

export -f diskchooser

########## 3. Executable code

Expand Down

0 comments on commit ed8a692

Please sign in to comment.