From 761849664b8bc1c73acddea31750482277badcce Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Tue, 26 May 2020 12:35:36 +0300 Subject: [PATCH 001/106] =?UTF-8?q?=CE=91=CF=86=CE=B1=CE=AF=CF=81=CE=B5?= =?UTF-8?q?=CF=83=CE=B7=20UEFI-BIOS=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/archon.sh b/archon.sh index af5be89..f1944e9 100755 --- a/archon.sh +++ b/archon.sh @@ -627,41 +627,6 @@ sleep 1 set -e ################### Check if BIOS or UEFI ##################### -function UEFI () { -if [[ "$diskvar" = *"/dev/sd"[a-z]* ]]; then - parted "$diskvar" mklabel gpt - parted "$diskvar" mkpart ESP fat32 1MiB 513MiB - parted "$diskvar" mkpart primary ext4 513MiB 100% - mkfs.fat -F32 "$diskvar""1" - disknumber="2" - filesystems - mkdir "/mnt/boot" - mount "$diskvar""1" "/mnt/boot" - sleep 1 -else - parted "$diskvar" mklabel gpt - parted "$diskvar" mkpart ESP fat32 1MiB 513MiB - parted "$diskvar" mkpart primary ext4 513MiB 100% - mkfs.fat -F32 "$diskvar""p1" - disknumber="p2" - filesystems - mkdir "/mnt/boot" - mount "$diskvar""p1" "/mnt/boot" - sleep 1 -fi -} -function BIOS () { - if [[ "$diskvar" = *"/dev/sd"[a-z]* ]]; then - parted "$diskvar" mklabel msdos - parted "$diskvar" mkpart primary ext4 1MiB 100% - sleep 1 - else - parted "$diskvar" mklabel msdos - parted "$diskvar" mkpart primary ext4 1MiB 100% - sleep 1 - fi -} - if [ -d /sys/firmware/efi ]; then #Η αρχική συνθήκη παραμένει ίδια echo echo -e "${IYellow} Χρησιμοποιείς PC με UEFI${NC}"; From 0c543b3c611f94d02f3524b02d74d33d63847af6 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Tue, 26 May 2020 12:40:19 +0300 Subject: [PATCH 002/106] =?UTF-8?q?=CE=95=CE=BD=CF=83=CF=89=CE=BC=CE=AC?= =?UTF-8?q?=CF=84=CF=89=CF=83=CE=B7=20UEFI=20paritioning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index ad6de72..48937a0 100755 --- a/archon.sh +++ b/archon.sh @@ -632,7 +632,10 @@ if [ -d /sys/firmware/efi ]; then #Η αρχική συνθήκη παραμέ echo -e "${IYellow} Χρησιμοποιείς PC με UEFI${NC}"; echo sleep 1 - UEFI #Συνάρτηση για UEFI, αν προστεθεί sd? ή nvme? (line 311-333) + parted "$diskvar" mklabel gpt + parted "$diskvar" mkpart ESP fat32 1MiB 513MiB + parted "$diskvar" mkpart primary ext4 513MiB 100% + mkfs.fat -F32 "$diskvar""1" else echo echo -e "${IYellow} Χρησιμοποιείς PC με BIOS${NC}"; From ab53bc17e1e1cf8a7b58f69e72e5af692f4e3981 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Tue, 26 May 2020 12:43:17 +0300 Subject: [PATCH 003/106] =?UTF-8?q?=CE=95=CE=BD=CF=83=CF=89=CE=BC=CE=AC?= =?UTF-8?q?=CF=84=CF=89=CF=83=CE=B7=20diskletter=20=CF=83=CE=B5=20=CF=80?= =?UTF-8?q?=CE=B5=CF=81=CE=AF=CF=80=CF=84=CF=89=CF=83=CE=B7=20nvme=20?= =?UTF-8?q?=CE=B4=CE=AF=CF=83=CE=BA=CE=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/archon.sh b/archon.sh index 48937a0..c6328f6 100755 --- a/archon.sh +++ b/archon.sh @@ -514,6 +514,8 @@ if [ $input -gt 0 ] && [ $input -le $num ]; #έλεγχος αν το input εί else diskvar="/dev/"$(cat disks | head -n$(( $input )) | tail -n1 ) echo Διάλεξατε τον $diskvar + if [ "$diskvar" = *"/dev/nvme0n"[1-9]* ]; then + diskletter="p" fi break else From f40b7cc658a9c066f387bf76f2c44dfe1cd71ff0 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Tue, 26 May 2020 12:48:00 +0300 Subject: [PATCH 004/106] =?UTF-8?q?=CE=95=CE=BD=CF=83=CF=89=CE=BC=CE=AC?= =?UTF-8?q?=CF=84=CF=89=CF=83=CE=B7=20=CE=BC=CE=B5=CF=84=CE=B1=CE=B2=CE=BB?= =?UTF-8?q?=CE=B7=CF=84=CE=AE=CF=82=20diskletter=20=CF=8C=CF=80=CE=BF?= =?UTF-8?q?=CF=85=20=CF=87=CF=81=CE=B5=CE=B9=CE=AC=CE=B6=CE=B5=CF=84=CE=B1?= =?UTF-8?q?=CE=B9=20=CF=83=CE=B5=20=CF=80=CE=B5=CF=81=CE=AF=CF=80=CF=84?= =?UTF-8?q?=CF=89=CF=83=CE=B7=20nvme=20=CE=B4=CE=AF=CF=83=CE=BA=CE=BF?= =?UTF-8?q?=CF=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/archon.sh b/archon.sh index c6328f6..2137062 100755 --- a/archon.sh +++ b/archon.sh @@ -32,25 +32,25 @@ function filesystems() { case $opt in "ext4") fsprogs="e2fsprogs" - mkfs.ext4 "$diskvar""$disknumber" + mkfs.ext4 "$diskvar""$diskletter""$disknumber" mount "$diskvar""$disknumber" "/mnt" break ;; "XFS") fsprogs="xfsprogs" - mkfs.xfs "$diskvar""$disknumber" + mkfs.xfs "$diskvar""$diskletter""$disknumber" mount "$diskvar""$disknumber" "/mnt" break ;; "Btrfs") fsprogs="btrfs-progs" - mkfs.btrfs "-f" "$diskvar""$disknumber" + mkfs.btrfs "-f" "$diskvar""$diskletter""$disknumber" mount "$diskvar""$disknumber" "/mnt" break ;; "F2FS") fsprogs="f2fs-tools" - mkfs.f2fs "-f" "$diskvar""$disknumber" + mkfs.f2fs "-f" "$diskvar""$diskletter""$disknumber" mount "$diskvar""$disknumber" "/mnt" break ;; @@ -637,7 +637,13 @@ if [ -d /sys/firmware/efi ]; then #Η αρχική συνθήκη παραμέ parted "$diskvar" mklabel gpt parted "$diskvar" mkpart ESP fat32 1MiB 513MiB parted "$diskvar" mkpart primary ext4 513MiB 100% - mkfs.fat -F32 "$diskvar""1" + disknumber="1" + mkfs.fat -F32 "$diskvar""$diskletter""$disknumber" + mkdir "/mnt/boot" + mount "$diskvar""$diskletter""$disknumber" + disknumber="2" + filesystems + sleep 1 else echo echo -e "${IYellow} Χρησιμοποιείς PC με BIOS${NC}"; @@ -655,11 +661,7 @@ else "MBR") parted "$diskvar" mklabel msdos parted "$diskvar" mkpart primary ext4 1MiB 100% - if [[ "$diskvar" = *"/dev/sd"[a-z]* ]]; then - disknumber="1" - else - disknumber="p1" - fi + disknumber="1" filesystems break ;; @@ -668,11 +670,7 @@ else parted "$diskvar" mkpart primary 1 3 parted "$diskvar" set 1 bios_grub on parted "$diskvar" mkpart primary ext4 3MiB 100% - if [[ "$diskvar" = *"/dev/sd"[a-z]* ]]; then - disknumber="2" - else - disknumber="p2" - fi + disknumber="1" filesystems break ;; From 1a717a7614213591d44227c9ef34de48ed1229a6 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Tue, 26 May 2020 12:52:17 +0300 Subject: [PATCH 005/106] =?UTF-8?q?=CE=94=CE=B9=CF=8C=CF=81=CE=B8=CF=89?= =?UTF-8?q?=CF=83=CE=B7=20line=20521?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archon.sh b/archon.sh index 2137062..1b37c73 100755 --- a/archon.sh +++ b/archon.sh @@ -514,9 +514,9 @@ if [ $input -gt 0 ] && [ $input -le $num ]; #έλεγχος αν το input εί else diskvar="/dev/"$(cat disks | head -n$(( $input )) | tail -n1 ) echo Διάλεξατε τον $diskvar - if [ "$diskvar" = *"/dev/nvme0n"[1-9]* ]; then + if [ "$diskvar" = *"/dev/nvme0n"[1-9]* ]; then diskletter="p" - fi + fi break else echo -e "${IYellow}Αριθμός εκτός λίστας${NC}" From 6e438aa798e1d8ba82ac5f52852e6094ce74ad3e Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Tue, 26 May 2020 12:55:52 +0300 Subject: [PATCH 006/106] =?UTF-8?q?=CE=94=CE=B9=CF=8C=CF=81=CE=B8=CF=89?= =?UTF-8?q?=CF=83=CE=B7=20=CF=83=CE=B5=20if=20=CF=83=CF=85=CE=BD=CE=B8?= =?UTF-8?q?=CE=AE=CE=BA=CE=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/archon.sh b/archon.sh index 1b37c73..b0d472f 100755 --- a/archon.sh +++ b/archon.sh @@ -513,12 +513,13 @@ if [ $input -gt 0 ] && [ $input -le $num ]; #έλεγχος αν το input εί echo Διάλεξατε τον $grubvar else diskvar="/dev/"$(cat disks | head -n$(( $input )) | tail -n1 ) - echo Διάλεξατε τον $diskvar if [ "$diskvar" = *"/dev/nvme0n"[1-9]* ]; then - diskletter="p" + diskletter="p" fi + echo Διάλεξατε τον $diskvar + fi break - else +else echo -e "${IYellow}Αριθμός εκτός λίστας${NC}" sleep 2 clear From 5fbe07917ba1ad7445296842551fca833eca5f0c Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Tue, 26 May 2020 12:58:00 +0300 Subject: [PATCH 007/106] =?UTF-8?q?=CE=94=CE=B9=CF=8C=CF=81=CE=B8=CF=89?= =?UTF-8?q?=CF=83=CE=B7=20disknumber=20=CF=83=CE=B5=20GPT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index b0d472f..26da941 100755 --- a/archon.sh +++ b/archon.sh @@ -671,7 +671,7 @@ else parted "$diskvar" mkpart primary 1 3 parted "$diskvar" set 1 bios_grub on parted "$diskvar" mkpart primary ext4 3MiB 100% - disknumber="1" + disknumber="2" filesystems break ;; From 3d28794a12f7e7ab2ef75b0e52f412c8268a2654 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Tue, 26 May 2020 13:58:40 +0300 Subject: [PATCH 008/106] =?UTF-8?q?=CE=94=CE=B9=CF=8C=CF=81=CE=B8=CF=89?= =?UTF-8?q?=CF=83=CE=B7=20=CF=83=CF=85=CE=BD=CE=AE=CE=B8=CE=B7=CE=BA=CE=B7?= =?UTF-8?q?=CF=82=20if=20=CE=B3=CE=B9=CE=B1=20=CF=84=CE=BF=20diskvar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index 26da941..1f917e3 100755 --- a/archon.sh +++ b/archon.sh @@ -513,7 +513,7 @@ if [ $input -gt 0 ] && [ $input -le $num ]; #έλεγχος αν το input εί echo Διάλεξατε τον $grubvar else diskvar="/dev/"$(cat disks | head -n$(( $input )) | tail -n1 ) - if [ "$diskvar" = *"/dev/nvme0n"[1-9]* ]; then + if [[ "$diskvar" = *"/dev/nvme0n"[1-9]* ]]; then diskletter="p" fi echo Διάλεξατε τον $diskvar From d570f1e77c9587a430639162b6c7a652d1df19b9 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Tue, 26 May 2020 14:03:10 +0300 Subject: [PATCH 009/106] =?UTF-8?q?=CE=94=CE=B9=CF=8C=CF=81=CE=B8=CF=89?= =?UTF-8?q?=CF=83=CE=B7=20UEFI=20mount?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index 1f917e3..3154ae5 100755 --- a/archon.sh +++ b/archon.sh @@ -641,7 +641,7 @@ if [ -d /sys/firmware/efi ]; then #Η αρχική συνθήκη παραμέ disknumber="1" mkfs.fat -F32 "$diskvar""$diskletter""$disknumber" mkdir "/mnt/boot" - mount "$diskvar""$diskletter""$disknumber" + mount "$diskvar""$diskletter""$disknumber" "/mnt/boot" disknumber="2" filesystems sleep 1 From 673f75c47a7dd235d1334ad1ed6b11477eaaf2b6 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Tue, 26 May 2020 14:07:40 +0300 Subject: [PATCH 010/106] =?UTF-8?q?=CE=95=CF=80=CE=B9=CF=80=CE=BB=CE=AD?= =?UTF-8?q?=CE=BF=CE=BD=20=CE=B1=CE=BD=CE=B1=CE=B3=CE=BA=CE=B1=CE=AF=CE=B1?= =?UTF-8?q?=20diskletter=20=CF=83=CF=84=CE=B7=CE=BD=20filesystems?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/archon.sh b/archon.sh index 3154ae5..8f85724 100755 --- a/archon.sh +++ b/archon.sh @@ -33,25 +33,25 @@ function filesystems() { "ext4") fsprogs="e2fsprogs" mkfs.ext4 "$diskvar""$diskletter""$disknumber" - mount "$diskvar""$disknumber" "/mnt" + mount "$diskvar""$diskletter""$disknumber" "/mnt" break ;; "XFS") fsprogs="xfsprogs" mkfs.xfs "$diskvar""$diskletter""$disknumber" - mount "$diskvar""$disknumber" "/mnt" + mount "$diskvar""$diskletter""$disknumber" "/mnt" break ;; "Btrfs") fsprogs="btrfs-progs" mkfs.btrfs "-f" "$diskvar""$diskletter""$disknumber" - mount "$diskvar""$disknumber" "/mnt" + mount "$diskvar""$diskletter""$disknumber" "/mnt" break ;; "F2FS") fsprogs="f2fs-tools" mkfs.f2fs "-f" "$diskvar""$diskletter""$disknumber" - mount "$diskvar""$disknumber" "/mnt" + mount "$diskvar""$diskletter""$disknumber" "/mnt" break ;; *) echo -e "${IRed}Οι επιλογές σας πρέπει να είναι [1 ~ 4]. Παρακαλώ προσπαθήστε ξανα!${NC}";; From 8f55535602c4761937b7f457061d203f30bb4aa9 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Tue, 26 May 2020 14:37:48 +0300 Subject: [PATCH 011/106] =?UTF-8?q?=CE=94=CE=B9=CF=8C=CF=81=CE=B8=CF=89?= =?UTF-8?q?=CF=83=CE=B7=20=CF=83=CF=86=CE=AC=CE=BB=CE=BC=CE=B1=CF=84=CE=BF?= =?UTF-8?q?=CF=82=20grub-install?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/archon.sh b/archon.sh index 8f85724..c332ba3 100755 --- a/archon.sh +++ b/archon.sh @@ -640,10 +640,11 @@ if [ -d /sys/firmware/efi ]; then #Η αρχική συνθήκη παραμέ parted "$diskvar" mkpart primary ext4 513MiB 100% disknumber="1" mkfs.fat -F32 "$diskvar""$diskletter""$disknumber" - mkdir "/mnt/boot" - mount "$diskvar""$diskletter""$disknumber" "/mnt/boot" disknumber="2" filesystems + disknumber="1" + mkdir "/mnt/boot" + mount "$diskvar""$diskletter""$disknumber" "/mnt/boot" sleep 1 else echo From d2c2979f056b74cfa326018d99ab8c8971bb4518 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Tue, 26 May 2020 19:48:17 +0300 Subject: [PATCH 012/106] =?UTF-8?q?=CE=A0=CF=81=CE=BF=CF=83=CE=B8=CE=AE?= =?UTF-8?q?=CE=BA=CE=B7=20=CF=83=CF=87=CE=BF=CE=BB=CE=AF=CF=89=CE=BD=20?= =?UTF-8?q?=CF=83=CF=84=CE=BF=CE=BD=20=CE=BA=CF=8E=CE=B4=CE=B9=CE=BA=CE=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/archon.sh b/archon.sh index c332ba3..e1e5ba8 100755 --- a/archon.sh +++ b/archon.sh @@ -29,7 +29,7 @@ function filesystems() { options=("ext4" "XFS" "Btrfs" "F2FS") select opt in "${options[@]}" do - case $opt in + case $opt in # Η diskletter παίρνει τιμή μόνο αν είναι nvme ο δίσκος "ext4") fsprogs="e2fsprogs" mkfs.ext4 "$diskvar""$diskletter""$disknumber" @@ -513,7 +513,7 @@ if [ $input -gt 0 ] && [ $input -le $num ]; #έλεγχος αν το input εί echo Διάλεξατε τον $grubvar else diskvar="/dev/"$(cat disks | head -n$(( $input )) | tail -n1 ) - if [[ "$diskvar" = *"/dev/nvme0n"[1-9]* ]]; then + if [[ "$diskvar" = *"/dev/nvme0n"[1-9]* ]]; then #Εκχώρηση τιμής στην diskletter αν είναι nvme ο δίσκος. diskletter="p" fi echo Διάλεξατε τον $diskvar @@ -638,11 +638,11 @@ if [ -d /sys/firmware/efi ]; then #Η αρχική συνθήκη παραμέ parted "$diskvar" mklabel gpt parted "$diskvar" mkpart ESP fat32 1MiB 513MiB parted "$diskvar" mkpart primary ext4 513MiB 100% - disknumber="1" + disknumber="1" # Η τιμή 1 γιατί θέλουμε το 1ο partition mkfs.fat -F32 "$diskvar""$diskletter""$disknumber" - disknumber="2" + disknumber="2" # Στο δεύτερο partition κάνει mount το /mnt στην filesystem. filesystems - disknumber="1" + disknumber="1" # Προσοχή οι γραμμές 646-647 αν μπουν πάνω από την filesystem υπάρχει πρόβλημα στο boot. mkdir "/mnt/boot" mount "$diskvar""$diskletter""$disknumber" "/mnt/boot" sleep 1 @@ -668,11 +668,11 @@ else break ;; "GPT") + disknumber="2" parted "$diskvar" mklabel gpt parted "$diskvar" mkpart primary 1 3 parted "$diskvar" set 1 bios_grub on parted "$diskvar" mkpart primary ext4 3MiB 100% - disknumber="2" filesystems break ;; From c76ae6745a19a761f126732da1ee7298e7f71594 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 28 May 2020 22:25:59 +0300 Subject: [PATCH 013/106] Missing netctl #73 Missing netctl Remove wpa_actiond --> moved to aur --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index 12a9972..c18e363 100755 --- a/archon.sh +++ b/archon.sh @@ -277,7 +277,7 @@ function chroot_stage { if [ "$wifi" = "" ]; then # Έλεγχος αν υπάρχει κάρτα wifi echo -e "${IYellow}Δε βρέθηκε ασύρματη κάρτα δικτύου${NC}" # και αν υπάρχει γίνεται εγκατάσταση else # και ενεργοποίηση - pacman -S --noconfirm iw wpa_supplicant dialog wpa_actiond + pacman -S --noconfirm iw wpa_supplicant dialog netctl systemctl enable netctl-auto@"$wifi".service echo -e "${IGreen}Η ασύρματη κάρτα δικτύου $wifi ρυθμίστηκε επιτυχώς${NC}" fi From 4a55dec7e066b89448455a20e3fb23d0f3baa55a Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 28 May 2020 22:57:50 +0300 Subject: [PATCH 014/106] Add John --- AUTHORS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AUTHORS b/AUTHORS index 33495ec..e340eea 100644 --- a/AUTHORS +++ b/AUTHORS @@ -20,6 +20,10 @@ Main Authors Vasilis Niakas : https://github.com/billniakas Salih Emin : https://github.com/cerebrux +QA +~~~~~~~~~~~~ +JohnGavr : https://github.com/JohnGavr + Contributors ~~~~~~~~~~~~ @@ -28,3 +32,4 @@ Ant. George : https://github.com/AntGeorge George Ioakeimidis : https://github.com/giorgosioak 217alex : https://github.com/217alex Dimitris Katsimardos : https://github.com/dimkatsi91 +JohnGavr : https://github.com/JohnGavr From 02f8f2c207c9b2e723342da2027d160a405cf839 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 28 May 2020 23:55:03 +0300 Subject: [PATCH 015/106] test shellcheck --- .github/workflows/main.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..ccdb09e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,16 @@ +name: reviewdog +on: [pull_request] +jobs: + shellcheck: + name: runner / shellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: shellcheck + uses: reviewdog/action-shellcheck@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review # Change reporter. + path: "." # Optional. + pattern: "*.sh" # Optional. + exclude: "./.git/*" # Optional. From b0fef9334201feccbe942e40047e8c7c5891023a Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 01:43:22 +0300 Subject: [PATCH 016/106] move back file --- postinstall/post_programs_installer.sh | 195 +++++++++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 postinstall/post_programs_installer.sh diff --git a/postinstall/post_programs_installer.sh b/postinstall/post_programs_installer.sh new file mode 100644 index 0000000..8085d59 --- /dev/null +++ b/postinstall/post_programs_installer.sh @@ -0,0 +1,195 @@ +#!/bin/bash +# +# +# Archon -- Ελληνικός Arch Linux Installer +# Copyright (c)2017 Vasilis Niakas, Salih Emin and Contributors +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation version 3 of the License. +# +# Please read the file LICENSE, README and AUTHORS for more information. + + +# Exit codes για success || failure +# +# setfont gr928a-8x16.psfu +OK=0 +NOT_OK=1 + +# A few colors +# +IRed='\033[0;91m' # Red +#IGreen='\033[0;92m' # Green +IYellow='\033[0;93m' # Yellow +ICyan='\033[0;96m' # Not used yet Cyan +IBlue='\033[0;94m' # Blue +NC='\033[0m' # No Color + +# Check Net Connection | If it is off , exit immediately +# +function check_net_connection() { + sleep 1 + echo '---------------------------------------' + echo ' Έλεγχος σύνδεσης στο διαδίκτυο ' + echo '---------------------------------------' + if ping -c 3 www.google.com &> /dev/null; then + echo -e "${IYellow} Η σύνδεση στο διαδίκτυο φαίνεται ενεργοποιημένη...Προχωράμε...\n${NC}" + else + echo -e "${IRed} Η σύνδεση στο Διαδίκτυο φαίνεται απενεργοποιημένη ... Ματαίωση ...\n" + echo -e "Συνδεθείτε στο Διαδίκτυο και δοκιμάστε ξανά ... \n Ματαίωση...${NC}" + exit $NOT_OK + fi +} + +# +# Template install function for installing one of two options of two programs | for now at least +# +function install() { + # Program to install : audacious -> 1st arg | clementine -> 2nd arg | Explanation -> 3rd argument + # + prog_une=$1 + prog_deux=$2 + comment="$3 $4" + + PS3="Γράψτε την επιλογή σας [1 -> $prog_une, 2 -> $prog_deux ή 3 -> exit] >>> " + options=($prog_une $prog_deux "exit") + + select choice in "${options[@]}" + do + + case "$choice" in + "$prog_une") + echo -e "${IBlue} \nΕγκατάσταση $1 $3 ... ${NC}\n" + if pacman -S --noconfirm $prog_une + then + # Sweet, installed program + echo -e "${IYellow} \n[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $prog_une $comment ... ${NC}\n" + return $OK + else + # Oops, failure during program installation + echo -e "${IRed} \n[ ΑΠΟΤΥΧΙΑ ] Εγκατάσταση $prog_une $comment ... ${NC}\n" + return $NOT_OK + fi + ;; + "$prog_deux") + echo -e "${IBlue} \nΕγκατάσταση Audacious Music Player ... ${NC}\n" + if pacman -S --noconfirm $prog_deux + then + # Sweet, installed + echo -e "${IYellow} \n[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $prog_deux $comment ...${NC}\n" + return $OK + else + # Oops, failure during program installation + echo -e "${IRed} \n[ ΑΠΟΤΥΧΙΑ ] Εγκατάσταση $prog_deux $comment ...${NC}\n" + return $NOT_OK + fi + ;; + "exit") + echo -e "${ICyan}\n Έξοδος όπως επιλέχθηκε από τον χρήστη: '${USER}' ...\n${NC}" + return $OK + ;; + *) + echo -e "${ICyan}\nΟι επιλογές σας πρέπει να είναι [1 ή 2 ή 3]. Μη έγκυρη επιλογή! \n\n${NC}" + sleep 1 + ;; + esac + + done + + return $OK +} + + +# Helping function in order to continue main procedure or not +# +function continue_or_not_check() { + echo -e "Θα θέλατε να συνεχίσετε με την εγκατάσταση προγράμματος $1 ?\n" + + PS3="Γράψτε την επιλογή σας [1 -> Yes | 2 -> No] >>> " + options=("yes" "no") + + select continue_or_not in "${options[@]}" + do + case "$continue_or_not" in + "yes") + echo -e "${ICyan}Προχωράμε με την εγκατάσταση $1 ... ${NC}\n" + break + ;; + "no") + echo -e "${IRed}Έξοδος μετά από επιλογή του υπερ-χρήστη '$USER' ...${NC}\n" + exit $OK + ;; + *) + echo -e "${ICyan}Invalid option detected ...\n${NC}" + ;; + esac + done +} + + +function main() { + # If user is not the super-user, then abort + # + if [ $UID -ne $OK ] + then + echo -e "${IRed} Γίνετε root μέσω του 'sudo -s' | 'sudo -i' | 'su' εντολών και δοκιμάστε ξανά ... ${NC}" + exit $NOT_OK + else + check_net_connection + echo -e "${ICyan} Ξεκινάμε με την εγκατάσταση ενός Music Player ...${NC}\n" + # 1st: Install a Music Player + # + install "clementine" "audacious" "Music Player" + # + # Perform a check : User wishes to continue OR NOT ?? + # + continue_or_not_check "Πολυμέσων (Media Player) " + # 2nd: Install A Media Player + # + install "vlc" "mpv" "Media Player" + # + # Perform a check : User wishes to continue OR NOT ?? + # + continue_or_not_check "περιήγησης στο Διαδίκτυο (Internet Explorer) " + # 3rd : Install a Web Browser + # + install "firefox" "chromium" "Web Broswer" + # + # Perform a check : User wishes to continue OR NOT ?? + # + continue_or_not_check "διαχείρησης Ηλεκτρονικού ταχυδρομίου (Email Client) " + # 4th : Install an Email Client + # + install "thunderbird" "evolution" "Email Client" + # + # Perform a check : User wishes to continue OR NOT ?? + # + continue_or_not_check " Επεξεργασίας κειμένου (Text Editor) " + # 5th : Install a Text/Code Editor + # + install "code" "atom" "Text/Code Editor" + # + # Perform a check : User wishes to continue OR NOT ?? + # + continue_or_not_check " Εξυπηρετητή Torrent (BitTorrent Client) " + # 6th : Install a Bit Torrent Client + # + install "transmission-gtk" "deluge" # "ktorrent" "rtorrent" ?? + + fi +} + + +############# +### MAIN ### +########### + +# Start main function +# +main + +echo -e " $IBlue '$(basename $0)' Ολοκληρώθηκε με επιτυχία ... $NC \n" + +# TODO: Add logging of all actions maybe ? +# \ No newline at end of file From ea3362615aeb27b4c58cc3c44813d1b8bf99541b Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 01:49:35 +0300 Subject: [PATCH 017/106] removed for testing - done -} --- archon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archon.sh b/archon.sh index c18e363..aa2149c 100755 --- a/archon.sh +++ b/archon.sh @@ -56,8 +56,8 @@ function filesystems() { ;; *) echo -e "${IRed}Οι επιλογές σας πρέπει να είναι [1 ~ 4]. Παρακαλώ προσπαθήστε ξανα!${NC}";; esac - done -} + + ########Filesystem End ######################################## ######## Functions for Desktop and X Dsiplay server (X-Org)#### # From cd239706b49adad7a76ac34d6d1070e2e4d811b4 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 12:18:37 +0300 Subject: [PATCH 018/106] test new shell check https://github.com/marketplace/actions/run-shellcheck --- .github/workflows/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ccdb09e..0fd0eea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,8 +6,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - name: shellcheck - uses: reviewdog/action-shellcheck@v1 + - name: Run ShellCheck + uses: bewuethr/shellcheck-action@v2.0.3 + #- name: shellcheck + # uses: reviewdog/action-shellcheck@v1 with: github_token: ${{ secrets.github_token }} reporter: github-pr-review # Change reporter. From c35178fb03c6b630aabf10c1188b249c25c69812 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 13:01:30 +0300 Subject: [PATCH 019/106] add missing "done }" --- archon.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index aa2149c..d287743 100755 --- a/archon.sh +++ b/archon.sh @@ -56,7 +56,9 @@ function filesystems() { ;; *) echo -e "${IRed}Οι επιλογές σας πρέπει να είναι [1 ~ 4]. Παρακαλώ προσπαθήστε ξανα!${NC}";; esac - + done + } + ########Filesystem End ######################################## ######## Functions for Desktop and X Dsiplay server (X-Org)#### From 9e69390a1a14b86a4d96f6a6de7090f6c85353c6 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 13:05:14 +0300 Subject: [PATCH 020/106] intentional brakage to test shellcheck --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index d287743..3064f19 100755 --- a/archon.sh +++ b/archon.sh @@ -1,4 +1,4 @@ -#!/bin/bash +/bin/bash # # # Archon -- Ελληνικός Arch Linux Installer From 91ae3bdd645d9fabcb135c4882b0d367e07a1330 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 13:11:35 +0300 Subject: [PATCH 021/106] test https://github.com/marketplace/actions/run-shellcheck --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0fd0eea..401b56b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,8 +6,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - name: Run ShellCheck - uses: bewuethr/shellcheck-action@v2.0.3 + - name: Run Shellcheck + uses: azohra/shell-linter@latest #- name: shellcheck # uses: reviewdog/action-shellcheck@v1 with: From 06d152a90dd6f6e423b58ec3291060d48ae825b9 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 13:13:53 +0300 Subject: [PATCH 022/106] removed do --- archon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archon.sh b/archon.sh index 3064f19..f7cb43a 100755 --- a/archon.sh +++ b/archon.sh @@ -1,4 +1,4 @@ -/bin/bash +#!/bin/bash # # # Archon -- Ελληνικός Arch Linux Installer @@ -28,7 +28,7 @@ function filesystems() { PS3="Επιλέξτε filesystem: " options=("ext4" "XFS" "Btrfs" "F2FS") select opt in "${options[@]}" - do + case $opt in "ext4") fsprogs="e2fsprogs" From c9c337955cb43ba6399979facf65aad1611eed5f Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 13:58:22 +0300 Subject: [PATCH 023/106] Update main.yml --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 401b56b..1fcbcbc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,8 @@ jobs: steps: - uses: actions/checkout@v1 - name: Run Shellcheck - uses: azohra/shell-linter@latest + #uses: reviewdog/action-shellcheck@v1 + uses: bewuethr/shellcheck-action@v2.0.3 #- name: shellcheck # uses: reviewdog/action-shellcheck@v1 with: From 1fac3113c2263345c1dc6d32f7b6e30ef1a0e456 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 13:59:12 +0300 Subject: [PATCH 024/106] test # --- archon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archon.sh b/archon.sh index f7cb43a..3cf0e65 100755 --- a/archon.sh +++ b/archon.sh @@ -25,10 +25,10 @@ NC='\033[0m' ########Filesystem Function################## function filesystems() { - PS3="Επιλέξτε filesystem: " + PS3=Επιλέξτε filesystem: " options=("ext4" "XFS" "Btrfs" "F2FS") select opt in "${options[@]}" - + do case $opt in "ext4") fsprogs="e2fsprogs" From d72bb3c6774a9a0c8e00114ee63e275487ff7dbd Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 14:02:50 +0300 Subject: [PATCH 025/106] remove shebang --- archon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archon.sh b/archon.sh index 3cf0e65..d85716d 100755 --- a/archon.sh +++ b/archon.sh @@ -1,4 +1,4 @@ -#!/bin/bash +/bin/bash # # # Archon -- Ελληνικός Arch Linux Installer @@ -25,7 +25,7 @@ NC='\033[0m' ########Filesystem Function################## function filesystems() { - PS3=Επιλέξτε filesystem: " + PS3="Επιλέξτε filesystem: " options=("ext4" "XFS" "Btrfs" "F2FS") select opt in "${options[@]}" do From 3f51d0b7add0ad7dd6ec16d7dd00382ef5267e05 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 14:09:44 +0300 Subject: [PATCH 026/106] Shell Linter https://github.com/marketplace/actions/shell-linter --- .github/workflows/main.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..307ca60 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,19 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + pull_request: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + - uses: actions/checkout@v1 + - name: Run Shellcheck + uses: azohra/shell-linter@latest From ce7e2060f352c76b45ea8eac98574ddaa93e22e6 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 14:12:07 +0300 Subject: [PATCH 027/106] test shell linter --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index d85716d..42b3671 100755 --- a/archon.sh +++ b/archon.sh @@ -1,4 +1,4 @@ -/bin/bash +bin/bash # # # Archon -- Ελληνικός Arch Linux Installer From d4817f867286f9f75ae46fc117b4a20cbeeaa325 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 14:14:50 +0300 Subject: [PATCH 028/106] tetst --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index 42b3671..7303af5 100755 --- a/archon.sh +++ b/archon.sh @@ -24,7 +24,7 @@ NC='\033[0m' ########Filesystem Function################## -function filesystems() { +function filesystems() PS3="Επιλέξτε filesystem: " options=("ext4" "XFS" "Btrfs" "F2FS") select opt in "${options[@]}" From 92403cd0483d75f956148b9fa4ac1ee603e36afd Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 14:17:16 +0300 Subject: [PATCH 029/106] fixing all CI/CD tests --- archon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archon.sh b/archon.sh index 7303af5..f750afe 100755 --- a/archon.sh +++ b/archon.sh @@ -1,4 +1,4 @@ -bin/bash +#!/bin/bash # # # Archon -- Ελληνικός Arch Linux Installer @@ -24,7 +24,7 @@ NC='\033[0m' ########Filesystem Function################## -function filesystems() +function filesystems(){ PS3="Επιλέξτε filesystem: " options=("ext4" "XFS" "Btrfs" "F2FS") select opt in "${options[@]}" From 041ed8d04add0510e76908317aa618763bc545ff Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 22:17:46 +0300 Subject: [PATCH 030/106] Enlightenment Acpid iwd missing #86 --- archon.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index 9c1d6c3..9f8bff2 100755 --- a/archon.sh +++ b/archon.sh @@ -185,9 +185,10 @@ function initialize_desktop_selection() { ;; "Enlightenment") echo -e "${IGreen}Εγκατάσταση Enlightenment Desktop Environment ... \n${NC}" - installer "Enlightenment Desktop" "enlightenment terminology connman" + installer "Enlightenment Desktop" "enlightenment terminology connman acpid" installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm + sudo systemctl enable acpid sudo systemctl enable connman.service exit 0 ;; From 6c107782b5e3223263244bcf281524d86a5d5c7e Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 22:53:24 +0300 Subject: [PATCH 031/106] every step must define a `uses` or `run` key every step must define a `uses` or `run` key You have too many - where you are defining the step. There should only be one - per step in the job. https://stackoverflow.com/questions/58849770/github-actions-invalid-workflow-file-error --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7f1ea17..966d477 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,6 +14,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - - uses: actions/checkout@v1 + uses: actions/checkout@v1 - name: Run Shellcheck - uses: azohra/shell-linter@latest \ No newline at end of file + uses: azohra/shell-linter@latest From 0d8c8e7bea50dde38d160e2e5538b3564f4ed5a1 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 23:10:24 +0300 Subject: [PATCH 032/106] comment --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index 9f8bff2..2324672 100755 --- a/archon.sh +++ b/archon.sh @@ -185,7 +185,7 @@ function initialize_desktop_selection() { ;; "Enlightenment") echo -e "${IGreen}Εγκατάσταση Enlightenment Desktop Environment ... \n${NC}" - installer "Enlightenment Desktop" "enlightenment terminology connman acpid" + installer "Enlightenment Desktop" "enlightenment terminology connman acpid" #acpid and iwd need investigation installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm sudo systemctl enable acpid From 76f11580eaf97e81616fba4000abfa37064d106b Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 23:44:41 +0300 Subject: [PATCH 033/106] add (experimental) flag --- archon.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/archon.sh b/archon.sh index 2324672..e0c5023 100755 --- a/archon.sh +++ b/archon.sh @@ -26,7 +26,7 @@ NC='\033[0m' ########Filesystem Function################## function filesystems(){ PS3="Επιλέξτε filesystem: " - options=("ext4" "XFS" "Btrfs" "F2FS") + options=("ext4" "XFS (experimental)" "Btrfs (experimental)" "F2FS (experimental)") select opt in "${options[@]}" do case $opt in # Η diskletter παίρνει τιμή μόνο αν είναι nvme ο δίσκος @@ -36,19 +36,19 @@ function filesystems(){ mount "$diskvar""$diskletter""$disknumber" "/mnt" break ;; - "XFS") + "XFS (experimental)") fsprogs="xfsprogs" mkfs.xfs "$diskvar""$diskletter""$disknumber" mount "$diskvar""$diskletter""$disknumber" "/mnt" break ;; - "Btrfs") + "Btrfs (experimental)") fsprogs="btrfs-progs" mkfs.btrfs "-f" "$diskvar""$diskletter""$disknumber" mount "$diskvar""$diskletter""$disknumber" "/mnt" break ;; - "F2FS") + "F2FS (experimental)") fsprogs="f2fs-tools" mkfs.f2fs "-f" "$diskvar""$diskletter""$disknumber" mount "$diskvar""$diskletter""$disknumber" "/mnt" From 96d0d0d8d47d48a17199a29e41e8df5fc22469f1 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Fri, 29 May 2020 23:50:23 +0300 Subject: [PATCH 034/106] =?UTF-8?q?changed=20to=20=CE=B5=CF=80=CE=B9=CE=BB?= =?UTF-8?q?=CE=AD=CE=BE=CF=84=CE=B5=20=CF=83=CF=89=CF=83=CF=84=CE=AC=20#80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index e0c5023..bc7130e 100755 --- a/archon.sh +++ b/archon.sh @@ -54,7 +54,7 @@ function filesystems(){ mount "$diskvar""$diskletter""$disknumber" "/mnt" break ;; - *) echo -e "${IRed}Οι επιλογές σας πρέπει να είναι [1 ~ 4]. Παρακαλώ προσπαθήστε ξανα!${NC}";; + *) echo -e "${IRed}Οι επιλογές σας πρέπει να είναι [1 ~ 4]. Παρακαλώ επιλέξτε σωστά !${NC}";; esac done } From 3fc20343a7ec84f49042f34c82fa4d3a897941a9 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sat, 30 May 2020 15:59:12 +0300 Subject: [PATCH 035/106] shell check --- archon.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/archon.sh b/archon.sh index bc7130e..70e1dc2 100755 --- a/archon.sh +++ b/archon.sh @@ -722,3 +722,4 @@ echo ' Μπορείτε να επανεκκινήσετε το σύστημά σ echo '--------------------------------------------------------' sleep 5 exit + From 55bba733edb4964be4f6bf8b7ad0dc26a35f0d90 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sat, 30 May 2020 16:07:04 +0300 Subject: [PATCH 036/106] shell check post install --- archon.sh | 2 +- postinstall/post_programs_installer.sh | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/archon.sh b/archon.sh index 70e1dc2..56923b5 100755 --- a/archon.sh +++ b/archon.sh @@ -2,7 +2,7 @@ # # # Archon -- Ελληνικός Arch Linux Installer -# Copyright (c)2017 Vasilis Niakas, Salih Emin and Contributors +# Copyright (c)2017 Vasilis Niakas, Salih Emin and Contributors. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/postinstall/post_programs_installer.sh b/postinstall/post_programs_installer.sh index 8085d59..0b50d4d 100644 --- a/postinstall/post_programs_installer.sh +++ b/postinstall/post_programs_installer.sh @@ -53,7 +53,7 @@ function install() { comment="$3 $4" PS3="Γράψτε την επιλογή σας [1 -> $prog_une, 2 -> $prog_deux ή 3 -> exit] >>> " - options=($prog_une $prog_deux "exit") + options=("$prog_une" "$prog_deux" "exit") select choice in "${options[@]}" do @@ -61,7 +61,7 @@ function install() { case "$choice" in "$prog_une") echo -e "${IBlue} \nΕγκατάσταση $1 $3 ... ${NC}\n" - if pacman -S --noconfirm $prog_une + if pacman -S --noconfirm "$prog_une" then # Sweet, installed program echo -e "${IYellow} \n[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $prog_une $comment ... ${NC}\n" @@ -74,7 +74,7 @@ function install() { ;; "$prog_deux") echo -e "${IBlue} \nΕγκατάσταση Audacious Music Player ... ${NC}\n" - if pacman -S --noconfirm $prog_deux + if pacman -S --noconfirm "$prog_deux" then # Sweet, installed echo -e "${IYellow} \n[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $prog_deux $comment ...${NC}\n" @@ -189,7 +189,8 @@ function main() { # main -echo -e " $IBlue '$(basename $0)' Ολοκληρώθηκε με επιτυχία ... $NC \n" +echo -e " $IBlue '$(basename "$0")' Ολοκληρώθηκε με επιτυχία ... $NC \n" + +# TODO: Add logging of all actions maybe ??? +# -# TODO: Add logging of all actions maybe ? -# \ No newline at end of file From 4e73c8036c0413ba82b12651c81d2bd5a3b782e9 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sat, 30 May 2020 16:17:44 +0300 Subject: [PATCH 037/106] shell check archon --- archon.sh | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/archon.sh b/archon.sh index 56923b5..a07cb68 100755 --- a/archon.sh +++ b/archon.sh @@ -2,7 +2,7 @@ # # # Archon -- Ελληνικός Arch Linux Installer -# Copyright (c)2017 Vasilis Niakas, Salih Emin and Contributors. +# Copyright (c)2017 Vasilis Niakas, Salih Emin and Contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -82,7 +82,7 @@ function check_if_in_VM() { function installer() { echo -e "${IGreen}Εγκατάσταση $1 ...${NC}" - if pacman -S --noconfirm $2 + if pacman -S --noconfirm "$2" then echo -e "${IGreen}[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $1 ...${NC}" else @@ -180,7 +180,7 @@ function initialize_desktop_selection() { "i3") echo -e "${IGreen}Εγκατάσταση i3 Desktop Environment ... \n${NC}" installer "i3 Desktop" "i3 dmenu rxvt-unicode" - echo -e '#!/bin/bash \nexec i3' > /home/$USER/.xinitrc + echo -e '#!/bin/bash \nexec i3' > /home/"$USER"/.xinitrc exit 0 ;; "Enlightenment") @@ -202,7 +202,7 @@ function initialize_desktop_selection() { "Fluxbox") echo -e "${IGreen}Εγκατάσταση Fluxbox Desktop Environment ... \n${NC}" installer "Fluxbox Desktop" "fluxbox xterm menumaker" - echo -e '#!/bin/bash \nstartfluxbox' > /home/$USER/.xinitrc + echo -e '#!/bin/bash \nstartfluxbox' > /home/"$USER"/.xinitrc exit 0 ;; "Sugar") @@ -219,7 +219,7 @@ function initialize_desktop_selection() { exit 0 ;; "Έξοδος") - echo -e "${IYellow}Έξοδος όπως επιλέχθηκε από το χρήστη "${USER}"${NC}" + echo -e "${IYellow}Έξοδος όπως επιλέχθηκε από το χρήστη ${USER}${NC}" exit 0 ;; *) @@ -334,13 +334,13 @@ function chroot_stage { mkdir media cd media cd / - if [ $filesize -ne 0 ]; then + if [ "$filesize" -ne 0 ]; then num=0 while IFS='' read -r line || [[ -n "$line" ]]; do - num=$(( $num + 1 )) + num=$(( num + 1 )) echo $num mkdir /run/media/disk$num - mount $line /run/media/disk$num | echo -e "${IYellow}Προσαρτάται ο..."$num"oς δίσκος${NC}" + mount "$line" /run/media/disk$num && echo -e "${IYellow}Προσαρτάται ο... $num oς δίσκος${NC}" sleep 1 done < "disks.txt" @@ -495,8 +495,8 @@ echo "---------------------------------------------------------" num=0 while IFS='' read -r line || [[ -n "$line" ]]; do - num=$(( $num + 1 )) - echo "["$num"]" $line + num=$(( num + 1 )) + echo "[$num]" "$line" done < disks echo "---------------------------------------------------------" read -rp "Επιλέξτε δίσκο για εγκατάσταση (Q/q για έξοδο): " input @@ -508,18 +508,18 @@ if [[ $input = "q" ]] || [[ $input = "Q" ]] exit 0 fi -if [ $input -gt 0 ] && [ $input -le $num ]; #έλεγχος αν το input είναι μέσα στο εύρος της λίστας +if [ "$input" -gt 0 ] && [ "$input" -le $num ]; #έλεγχος αν το input είναι μέσα στο εύρος της λίστας then if [[ $1 = "grub" ]]; # αν προστεθεί το όρισμα grub τότε η μεταβλητή που θα αποθηκευτεί then # θα είναι η grubvar - grubvar="/dev/"$(cat disks | head -n$(( $input )) | tail -n1 ) - echo Διάλεξατε τον $grubvar + grubvar="/dev/"$(cat < disks | head -n$(( input )) | tail -n1 ) + echo Διάλεξατε τον "$grubvar" else - diskvar="/dev/"$(cat disks | head -n$(( $input )) | tail -n1 ) + diskvar="/dev/"$(cat < disks | head -n$(( input )) | tail -n1 ) if [[ "$diskvar" = *"/dev/nvme0n"[1-9]* ]]; then #Εκχώρηση τιμής στην diskletter αν είναι nvme ο δίσκος. diskletter="p" fi - echo Διάλεξατε τον $diskvar + echo Διάλεξατε τον "$diskvar" fi break else @@ -723,3 +723,4 @@ echo '--------------------------------------------------------' sleep 5 exit + From 1f564d842d730d9a143d299eccb54bbb739d72c7 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sat, 30 May 2020 17:15:08 +0300 Subject: [PATCH 038/106] target not found due to "$2" --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index a07cb68..5b530bb 100755 --- a/archon.sh +++ b/archon.sh @@ -82,7 +82,7 @@ function check_if_in_VM() { function installer() { echo -e "${IGreen}Εγκατάσταση $1 ...${NC}" - if pacman -S --noconfirm "$2" + if pacman -S --noconfirm "${2}" then echo -e "${IGreen}[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $1 ...${NC}" else From df6563ac66a09f8e820bf36e774970d621cef978 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sat, 30 May 2020 17:36:52 +0300 Subject: [PATCH 039/106] Added shellcheck with reviewdog Added shellcheck with reviewdog for inline commenting --- .github/workflows/main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 966d477..ee2ffde 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,3 +17,16 @@ jobs: uses: actions/checkout@v1 - name: Run Shellcheck uses: azohra/shell-linter@latest + shellcheck: + runs-on: ubuntu-latest + steps: + - name: runner / shellcheck + uses: actions/checkout@v1 + - name: shellcheck + uses: reviewdog/action-shellcheck@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review # Change reporter. + path: "." # Optional. + pattern: "*.sh" # Optional. + exclude: "./.git/*" # Optional. From 40d5086850ba6aed550a83932d074b8aa0aee0c3 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sat, 30 May 2020 17:39:51 +0300 Subject: [PATCH 040/106] Update with new CI reviewdog --- .github/workflows/main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 966d477..ee2ffde 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,3 +17,16 @@ jobs: uses: actions/checkout@v1 - name: Run Shellcheck uses: azohra/shell-linter@latest + shellcheck: + runs-on: ubuntu-latest + steps: + - name: runner / shellcheck + uses: actions/checkout@v1 + - name: shellcheck + uses: reviewdog/action-shellcheck@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review # Change reporter. + path: "." # Optional. + pattern: "*.sh" # Optional. + exclude: "./.git/*" # Optional. From 73edc58505ee773642242eea9e0cd61dcfe7d74f Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sat, 30 May 2020 18:34:38 +0300 Subject: [PATCH 041/106] added for loop for yolo --- archon.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/archon.sh b/archon.sh index 5b530bb..e6b44d6 100755 --- a/archon.sh +++ b/archon.sh @@ -82,12 +82,15 @@ function check_if_in_VM() { function installer() { echo -e "${IGreen}Εγκατάσταση $1 ...${NC}" - if pacman -S --noconfirm "${2}" - then - echo -e "${IGreen}[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $1 ...${NC}" - else - echo -e "${IRed}[ ΑΠΕΤΥΧΕ ] Εγκατάσταση $1 ...${NC}" - fi + for i in "${@}" + do + if pacman -S --noconfirm --noprogressbar "$i" + then + echo -e "${IGreen}[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $1 ...${NC}" + else + echo -e "${IRed}[ ΑΠΕΤΥΧΕ ] Εγκατάσταση $1 ...${NC}" + fi + done } # Check Net Connection | If it is off , exit immediately From 95e16706f579514f624d24a8f0d5dd1094e8b612 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sat, 30 May 2020 19:22:38 +0300 Subject: [PATCH 042/106] revert to $2 --- archon.sh | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/archon.sh b/archon.sh index e6b44d6..c5f24a9 100755 --- a/archon.sh +++ b/archon.sh @@ -82,17 +82,14 @@ function check_if_in_VM() { function installer() { echo -e "${IGreen}Εγκατάσταση $1 ...${NC}" - for i in "${@}" - do - if pacman -S --noconfirm --noprogressbar "$i" - then - echo -e "${IGreen}[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $1 ...${NC}" - else - echo -e "${IRed}[ ΑΠΕΤΥΧΕ ] Εγκατάσταση $1 ...${NC}" - fi - done -} + if pacman -S --noconfirm $2 + then + echo -e "${IGreen}[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $1 ...${NC}" + else + echo -e "${IRed}[ ΑΠΕΤΥΧΕ ] Εγκατάσταση $1 ...${NC}" + fi +} # Check Net Connection | If it is off , exit immediately # function check_net_connection() { From 795e3f6659f6ec631d8e28944d496102bdd56b28 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sat, 30 May 2020 19:50:16 +0300 Subject: [PATCH 043/106] level warning --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ee2ffde..d281cfb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,6 +27,7 @@ jobs: with: github_token: ${{ secrets.github_token }} reporter: github-pr-review # Change reporter. + level: warning path: "." # Optional. pattern: "*.sh" # Optional. exclude: "./.git/*" # Optional. From 6a512822c10a3f2ed33cc65cd4b4b1d3a0629a9d Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sat, 30 May 2020 19:53:01 +0300 Subject: [PATCH 044/106] level info --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d281cfb..88d7667 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,7 +27,7 @@ jobs: with: github_token: ${{ secrets.github_token }} reporter: github-pr-review # Change reporter. - level: warning + level: info path: "." # Optional. pattern: "*.sh" # Optional. exclude: "./.git/*" # Optional. From b04b1372c0b2f4d10464625d2ca52f22d184befa Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sat, 30 May 2020 19:57:41 +0300 Subject: [PATCH 045/106] shellcheck_flags: --severity=style --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 88d7667..4e9d1a4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,7 +27,8 @@ jobs: with: github_token: ${{ secrets.github_token }} reporter: github-pr-review # Change reporter. - level: info + level: info + shellcheck_flags: --severity=style path: "." # Optional. pattern: "*.sh" # Optional. exclude: "./.git/*" # Optional. From 4ec607d1f757ec350dc2a38287cd66bfbc0ad870 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sat, 30 May 2020 21:39:46 +0300 Subject: [PATCH 046/106] New installer "${@:2}" instead of $2 --- archon.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index c5f24a9..ac14e66 100755 --- a/archon.sh +++ b/archon.sh @@ -82,7 +82,7 @@ function check_if_in_VM() { function installer() { echo -e "${IGreen}Εγκατάσταση $1 ...${NC}" - if pacman -S --noconfirm $2 + if pacman -S --noconfirm "${@:2}" then echo -e "${IGreen}[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $1 ...${NC}" else @@ -108,6 +108,8 @@ function check_net_connection() { function initialize_desktop_selection() { sleep 2 + #echo "Εγκατάσταση Xorg Server" + #sudo pacman -S --noconfirm xorg xorg-server xorg-xinit alsa-utils alsa-firmware pulseaudio noto-fonts installer "Xorg Server" "xorg xorg-server xorg-xinit alsa-utils alsa-firmware pulseaudio noto-fonts" # Εγκατάσταση Xorg Server PS3='Επιλέξτε ένα από τα διαθέσιμα γραφικά περιβάλλοντα : ' @@ -118,6 +120,7 @@ function initialize_desktop_selection() { case "$choice" in "GNOME") echo -e "${IGreen}Εγκατάσταση GNOME Desktop Environment ...\n${NC}" + #sudo pacman -S --noconfirm gnome gnome-extra installer "GNOME Desktop" "gnome gnome-extra" sudo systemctl enable gdm sudo systemctl enable NetworkManager @@ -125,6 +128,7 @@ function initialize_desktop_selection() { ;; "Mate") echo -e "${IGreen}Εγκατάσταση Mate Desktop Environment ... \n${NC}" + #sudo pacman -S --noconfirm mate mate-extra lightdm lightdm-gtk-greeter installer "Mate Desktop" "mate mate-extra networkmanager network-manager-applet" installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm @@ -133,6 +137,7 @@ function initialize_desktop_selection() { ;; "Deepin") echo -e "${IGreen}Εγκατάσταση Deepin Desktop Environment ...\n${NC}" + #sudo pacman -S --noconfirm deepin deepin-extra networkmanager installer "Deepin Desktop" "deepin deepin-extra networkmanager" sudo systemctl enable lightdm sudo systemctl enable NetworkManager @@ -140,6 +145,7 @@ function initialize_desktop_selection() { ;; "Xfce") echo -e "${IGreen}Εγκατάσταση Xfce Desktop Environment ... \n${NC}" + #sudo pacman -S --noconfirm xfce4 xfce4-goodies pavucontrol networkmanager network-manager-applet lightdm lightdm-gtk-greeter installer "Xfce Desktop" "xfce4 xfce4-goodies pavucontrol networkmanager network-manager-applet" installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm @@ -148,6 +154,7 @@ function initialize_desktop_selection() { ;; "KDE") echo -e "${IGreen}Εγκατάσταση KDE Desktop Environment ... \n${NC}" + #sudo pacman -S --noconfirm plasma-meta konsole dolphin installer "KDE Desktop" "plasma-meta konsole dolphin" sudo systemctl enable sddm sudo systemctl enable NetworkManager @@ -155,6 +162,7 @@ function initialize_desktop_selection() { ;; "LXQt") echo -e "${IGreen}Εγκατάσταση LXQt Desktop Environment ... \n${NC}" + #sudo pacman -S --noconfirm lxqt breeze-icons sddm installer "LXQt Desktop" "lxqt breeze-icons" installer "SDDM Display Manager" "sddm" sudo systemctl enable sddm @@ -163,6 +171,7 @@ function initialize_desktop_selection() { ;; "Cinnamon") echo -e "${IGreen}Εγκατάσταση Cinnamon Desktop Environment ... \n${NC}" + #sudo pacman -S --noconfirm cinnamon xterm networkmanager lightdm lightdm-gtk-greeter installer "Cinnamon Desktop" "cinnamon xterm networkmanager" installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm @@ -171,6 +180,7 @@ function initialize_desktop_selection() { ;; "Budgie") echo -e "${IGreen}Εγκατάσταση Budgie Desktop Environment ... \n${NC}" + #sudo pacman -S --noconfirm budgie-desktop budgie-extras xterm networkmanager network-manager-applet lightdm lightdm-gtk-greeter installer "Budgie Desktop" "budgie-desktop budgie-extras xterm networkmanager network-manager-applet" installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm @@ -179,12 +189,14 @@ function initialize_desktop_selection() { ;; "i3") echo -e "${IGreen}Εγκατάσταση i3 Desktop Environment ... \n${NC}" + #sudo pacman -S --noconfirm i3 dmenu rxvt-unicode installer "i3 Desktop" "i3 dmenu rxvt-unicode" echo -e '#!/bin/bash \nexec i3' > /home/"$USER"/.xinitrc exit 0 ;; "Enlightenment") echo -e "${IGreen}Εγκατάσταση Enlightenment Desktop Environment ... \n${NC}" + #sudo pacman -S --nconfirm enlightenment terminology connman acpid lightdm lightdm-gtk-greeter installer "Enlightenment Desktop" "enlightenment terminology connman acpid" #acpid and iwd need investigation installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm @@ -194,6 +206,7 @@ function initialize_desktop_selection() { ;; "UKUI") echo -e "${IGreen}Εγκατάσταση UKUI Desktop Environment ... \n${NC}" + #sudo pacman -S --noconfirm ukui xterm networkmanager network-manager-applet installer "UKUI Desktop" "ukui xterm networkmanager network-manager-applet" sudo systemctl enable lightdm sudo systemctl enable NetworkManager @@ -201,12 +214,14 @@ function initialize_desktop_selection() { ;; "Fluxbox") echo -e "${IGreen}Εγκατάσταση Fluxbox Desktop Environment ... \n${NC}" + #sudo pacman -S --noconfirm fluxbox xterm menumaker installer "Fluxbox Desktop" "fluxbox xterm menumaker" echo -e '#!/bin/bash \nstartfluxbox' > /home/"$USER"/.xinitrc exit 0 ;; "Sugar") echo -e "${IGreen}Εγκατάσταση Sugar Desktop Environment ... \n${NC}" + #sudo pacman -S --noconfirm sugar sugar-fructose xterm lxdm installer "Sugar Desktop" "sugar sugar-fructose xterm" installer "LXDM Display Manager" "lxdm" sudo systemctl enable lxdm @@ -215,6 +230,7 @@ function initialize_desktop_selection() { ;; "Twm") echo -e "${IGreen}Εγκατάσταση Twm Desktop Environment ... \n${NC}" + #sudo pacman -S --noconfirm xorg-twm xterm xorg-xclock installer "Twm Desktop" "xorg-twm xterm xorg-xclock" exit 0 ;; From 4cb57ffb470298098ab43023b2aa9018723adee4 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sat, 30 May 2020 21:56:38 +0300 Subject: [PATCH 047/106] github-check --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ee2ffde..f08cc2c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: uses: reviewdog/action-shellcheck@v1 with: github_token: ${{ secrets.github_token }} - reporter: github-pr-review # Change reporter. + reporter: github-check # Change reporter. path: "." # Optional. pattern: "*.sh" # Optional. exclude: "./.git/*" # Optional. From d80649235b0998b4b0904c6978b05bfea4218cb9 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sat, 30 May 2020 22:28:29 +0300 Subject: [PATCH 048/106] revert 95e16706f579514f624d24a8f0d5dd1094e8b612 --- archon.sh | 98 +++++++++++++++++++++++++++---------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/archon.sh b/archon.sh index ac14e66..26296a9 100755 --- a/archon.sh +++ b/archon.sh @@ -78,18 +78,18 @@ function check_if_in_VM() { fi sleep 2 } - - -function installer() { - echo -e "${IGreen}Εγκατάσταση $1 ...${NC}" - if pacman -S --noconfirm "${@:2}" - then - echo -e "${IGreen}[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $1 ...${NC}" - else - echo -e "${IRed}[ ΑΠΕΤΥΧΕ ] Εγκατάσταση $1 ...${NC}" - fi - -} +installer +# Still produces : target not found +#function installer() { +# echo -e "${IGreen}Εγκατάσταση $1 ...${NC}" +# if pacman -S --noconfirm "${@:2}" +# then +# echo -e "${IGreen}[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $1 ...${NC}" +# else +# echo -e "${IRed}[ ΑΠΕΤΥΧΕ ] Εγκατάσταση $1 ...${NC}" +# fi +# +#} # Check Net Connection | If it is off , exit immediately # function check_net_connection() { @@ -108,9 +108,9 @@ function check_net_connection() { function initialize_desktop_selection() { sleep 2 - #echo "Εγκατάσταση Xorg Server" - #sudo pacman -S --noconfirm xorg xorg-server xorg-xinit alsa-utils alsa-firmware pulseaudio noto-fonts - installer "Xorg Server" "xorg xorg-server xorg-xinit alsa-utils alsa-firmware pulseaudio noto-fonts" # Εγκατάσταση Xorg Server + echo "Εγκατάσταση Xorg Server" + sudo pacman -S --noconfirm xorg xorg-server xorg-xinit alsa-utils alsa-firmware pulseaudio noto-fonts + #installer "Xorg Server" "xorg xorg-server xorg-xinit alsa-utils alsa-firmware pulseaudio noto-fonts" # Εγκατάσταση Xorg Server PS3='Επιλέξτε ένα από τα διαθέσιμα γραφικά περιβάλλοντα : ' options=("GNOME" "Mate" "Deepin" "Xfce" "KDE" "LXQt" "Cinnamon" "Budgie" "i3" "Enlightenment" "UKUI" "Fluxbox" "Sugar" "Twm" "Έξοδος") @@ -120,59 +120,59 @@ function initialize_desktop_selection() { case "$choice" in "GNOME") echo -e "${IGreen}Εγκατάσταση GNOME Desktop Environment ...\n${NC}" - #sudo pacman -S --noconfirm gnome gnome-extra - installer "GNOME Desktop" "gnome gnome-extra" + sudo pacman -S --noconfirm gnome gnome-extra + #installer "GNOME Desktop" "gnome gnome-extra" sudo systemctl enable gdm sudo systemctl enable NetworkManager exit 0 ;; "Mate") echo -e "${IGreen}Εγκατάσταση Mate Desktop Environment ... \n${NC}" - #sudo pacman -S --noconfirm mate mate-extra lightdm lightdm-gtk-greeter - installer "Mate Desktop" "mate mate-extra networkmanager network-manager-applet" - installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" + sudo pacman -S --noconfirm mate mate-extra lightdm lightdm-gtk-greeter + #installer "Mate Desktop" "mate mate-extra networkmanager network-manager-applet" + #installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm sudo systemctl enable NetworkManager exit 0 ;; "Deepin") echo -e "${IGreen}Εγκατάσταση Deepin Desktop Environment ...\n${NC}" - #sudo pacman -S --noconfirm deepin deepin-extra networkmanager - installer "Deepin Desktop" "deepin deepin-extra networkmanager" + sudo pacman -S --noconfirm deepin deepin-extra networkmanager + #installer "Deepin Desktop" "deepin deepin-extra networkmanager" sudo systemctl enable lightdm sudo systemctl enable NetworkManager exit 0 ;; "Xfce") echo -e "${IGreen}Εγκατάσταση Xfce Desktop Environment ... \n${NC}" - #sudo pacman -S --noconfirm xfce4 xfce4-goodies pavucontrol networkmanager network-manager-applet lightdm lightdm-gtk-greeter - installer "Xfce Desktop" "xfce4 xfce4-goodies pavucontrol networkmanager network-manager-applet" - installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" + sudo pacman -S --noconfirm xfce4 xfce4-goodies pavucontrol networkmanager network-manager-applet lightdm lightdm-gtk-greeter + #installer "Xfce Desktop" "xfce4 xfce4-goodies pavucontrol networkmanager network-manager-applet" + #installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm sudo systemctl enable NetworkManager exit 0 ;; "KDE") echo -e "${IGreen}Εγκατάσταση KDE Desktop Environment ... \n${NC}" - #sudo pacman -S --noconfirm plasma-meta konsole dolphin - installer "KDE Desktop" "plasma-meta konsole dolphin" + sudo pacman -S --noconfirm plasma-meta konsole dolphin + #installer "KDE Desktop" "plasma-meta konsole dolphin" sudo systemctl enable sddm sudo systemctl enable NetworkManager exit 0 ;; "LXQt") echo -e "${IGreen}Εγκατάσταση LXQt Desktop Environment ... \n${NC}" - #sudo pacman -S --noconfirm lxqt breeze-icons sddm - installer "LXQt Desktop" "lxqt breeze-icons" - installer "SDDM Display Manager" "sddm" + sudo pacman -S --noconfirm lxqt breeze-icons sddm + #installer "LXQt Desktop" "lxqt breeze-icons" + #installer "SDDM Display Manager" "sddm" sudo systemctl enable sddm sudo systemctl enable NetworkManager exit 0 ;; "Cinnamon") echo -e "${IGreen}Εγκατάσταση Cinnamon Desktop Environment ... \n${NC}" - #sudo pacman -S --noconfirm cinnamon xterm networkmanager lightdm lightdm-gtk-greeter - installer "Cinnamon Desktop" "cinnamon xterm networkmanager" + sudo pacman -S --noconfirm cinnamon xterm networkmanager lightdm lightdm-gtk-greeter + #installer "Cinnamon Desktop" "cinnamon xterm networkmanager" installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm sudo systemctl enable NetworkManager @@ -180,25 +180,25 @@ function initialize_desktop_selection() { ;; "Budgie") echo -e "${IGreen}Εγκατάσταση Budgie Desktop Environment ... \n${NC}" - #sudo pacman -S --noconfirm budgie-desktop budgie-extras xterm networkmanager network-manager-applet lightdm lightdm-gtk-greeter - installer "Budgie Desktop" "budgie-desktop budgie-extras xterm networkmanager network-manager-applet" - installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" + sudo pacman -S --noconfirm budgie-desktop budgie-extras xterm networkmanager network-manager-applet lightdm lightdm-gtk-greeter + #installer "Budgie Desktop" "budgie-desktop budgie-extras xterm networkmanager network-manager-applet" + #installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm sudo systemctl enable NetworkManager exit 0 ;; "i3") echo -e "${IGreen}Εγκατάσταση i3 Desktop Environment ... \n${NC}" - #sudo pacman -S --noconfirm i3 dmenu rxvt-unicode - installer "i3 Desktop" "i3 dmenu rxvt-unicode" + sudo pacman -S --noconfirm i3 dmenu rxvt-unicode + #installer "i3 Desktop" "i3 dmenu rxvt-unicode" echo -e '#!/bin/bash \nexec i3' > /home/"$USER"/.xinitrc exit 0 ;; "Enlightenment") echo -e "${IGreen}Εγκατάσταση Enlightenment Desktop Environment ... \n${NC}" - #sudo pacman -S --nconfirm enlightenment terminology connman acpid lightdm lightdm-gtk-greeter - installer "Enlightenment Desktop" "enlightenment terminology connman acpid" #acpid and iwd need investigation - installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" + sudo pacman -S --nconfirm enlightenment terminology connman acpid lightdm lightdm-gtk-greeter + #installer "Enlightenment Desktop" "enlightenment terminology connman acpid" #acpid and iwd need investigation + #installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm sudo systemctl enable acpid sudo systemctl enable connman.service @@ -206,32 +206,32 @@ function initialize_desktop_selection() { ;; "UKUI") echo -e "${IGreen}Εγκατάσταση UKUI Desktop Environment ... \n${NC}" - #sudo pacman -S --noconfirm ukui xterm networkmanager network-manager-applet - installer "UKUI Desktop" "ukui xterm networkmanager network-manager-applet" + sudo pacman -S --noconfirm ukui xterm networkmanager network-manager-applet + #installer "UKUI Desktop" "ukui xterm networkmanager network-manager-applet" sudo systemctl enable lightdm sudo systemctl enable NetworkManager exit 0 ;; "Fluxbox") echo -e "${IGreen}Εγκατάσταση Fluxbox Desktop Environment ... \n${NC}" - #sudo pacman -S --noconfirm fluxbox xterm menumaker - installer "Fluxbox Desktop" "fluxbox xterm menumaker" + sudo pacman -S --noconfirm fluxbox xterm menumaker + #installer "Fluxbox Desktop" "fluxbox xterm menumaker" echo -e '#!/bin/bash \nstartfluxbox' > /home/"$USER"/.xinitrc exit 0 ;; "Sugar") echo -e "${IGreen}Εγκατάσταση Sugar Desktop Environment ... \n${NC}" - #sudo pacman -S --noconfirm sugar sugar-fructose xterm lxdm - installer "Sugar Desktop" "sugar sugar-fructose xterm" - installer "LXDM Display Manager" "lxdm" + sudo pacman -S --noconfirm sugar sugar-fructose xterm lxdm + #installer "Sugar Desktop" "sugar sugar-fructose xterm" + #installer "LXDM Display Manager" "lxdm" sudo systemctl enable lxdm sudo systemctl enable NetworkManager exit 0 ;; "Twm") echo -e "${IGreen}Εγκατάσταση Twm Desktop Environment ... \n${NC}" - #sudo pacman -S --noconfirm xorg-twm xterm xorg-xclock - installer "Twm Desktop" "xorg-twm xterm xorg-xclock" + sudo pacman -S --noconfirm xorg-twm xterm xorg-xclock + #installer "Twm Desktop" "xorg-twm xterm xorg-xclock" exit 0 ;; "Έξοδος") From 7f3f561b3a29553c2ee211c4d9462d8ae63112f6 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sat, 30 May 2020 22:31:13 +0300 Subject: [PATCH 049/106] test workers --- archon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archon.sh b/archon.sh index 26296a9..d025f96 100755 --- a/archon.sh +++ b/archon.sh @@ -77,8 +77,8 @@ function check_if_in_VM() { pacman -Rs --noconfirm facter fi sleep 2 -} -installer + + # Still produces : target not found #function installer() { # echo -e "${IGreen}Εγκατάσταση $1 ...${NC}" From 8fdb2c1114e25eba61188d0fd818313f7da2fa16 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sat, 30 May 2020 22:35:18 +0300 Subject: [PATCH 050/106] fix intentional break --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index d025f96..81d6a87 100755 --- a/archon.sh +++ b/archon.sh @@ -77,7 +77,7 @@ function check_if_in_VM() { pacman -Rs --noconfirm facter fi sleep 2 - +} # Still produces : target not found #function installer() { From 5fdd2245a3529da4f7af0fa96cc73d9ca9f47e8f Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Mon, 1 Jun 2020 09:47:43 +0300 Subject: [PATCH 051/106] =?UTF-8?q?fix=20#93=20=E2=80=94nconfirm=20notfoun?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index 81d6a87..a118bc3 100755 --- a/archon.sh +++ b/archon.sh @@ -196,7 +196,7 @@ function initialize_desktop_selection() { ;; "Enlightenment") echo -e "${IGreen}Εγκατάσταση Enlightenment Desktop Environment ... \n${NC}" - sudo pacman -S --nconfirm enlightenment terminology connman acpid lightdm lightdm-gtk-greeter + sudo pacman -S --noconfirm enlightenment terminology connman acpid lightdm lightdm-gtk-greeter #installer "Enlightenment Desktop" "enlightenment terminology connman acpid" #acpid and iwd need investigation #installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm From 38f50174febf06ce4ec136a65403a970d0d6fd27 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Mon, 1 Jun 2020 09:56:33 +0300 Subject: [PATCH 052/106] =?UTF-8?q?crda=20fix=20#73=20-=20=CE=B1=CF=83?= =?UTF-8?q?=CF=8D=CF=81=CE=BC=CE=B1=CF=84=CE=B7=20=CE=BA=CE=AC=CF=81=CF=84?= =?UTF-8?q?=CE=B1=20=CE=B4=CE=B9=CE=BA=CF=84=CF=8D=CE=BF=CF=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index a118bc3..2822dd3 100755 --- a/archon.sh +++ b/archon.sh @@ -296,7 +296,7 @@ function chroot_stage { if [ "$wifi" = "" ]; then # Έλεγχος αν υπάρχει κάρτα wifi echo -e "${IYellow}Δε βρέθηκε ασύρματη κάρτα δικτύου${NC}" # και αν υπάρχει γίνεται εγκατάσταση else # και ενεργοποίηση - pacman -S --noconfirm iw wpa_supplicant dialog netctl + pacman -S --noconfirm iw wpa_supplicant dialog netctl wireless-regdb crda # CRDA/wireless-regdb : https://wiki.archlinux.org/index.php/Network_configuration/Wireless#Respecting_the_regulatory_domain systemctl enable netctl-auto@"$wifi".service echo -e "${IGreen}Η ασύρματη κάρτα δικτύου $wifi ρυθμίστηκε επιτυχώς${NC}" fi From e129e7a863c89d5772daa4f106d43e49bf5600f9 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Mon, 1 Jun 2020 11:05:14 +0300 Subject: [PATCH 053/106] =?UTF-8?q?add=20badge=20for=20#91=20=CE=AD=CE=BB?= =?UTF-8?q?=CE=B5=CE=B3=CF=87=CE=BF=CF=82=20=CF=80=CE=BF=CE=B9=CF=8C=CF=84?= =?UTF-8?q?=CE=B7=CF=84=CE=B1=CF=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d7d7199..d6a4637 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Archon (Άρχων) - +![Lint and Shellcheck CI](https://github.com/CerebruxCode/Archon/workflows/CI/badge.svg?branch=develop) ``` _____ __|_ |__ _____ ______ __ _ _____ ____ _ From 085e4e6be66a5853595f1f8c88c8da1f560bbcca Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Mon, 1 Jun 2020 11:09:07 +0300 Subject: [PATCH 054/106] test CI badge --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index 2822dd3..6b7f911 100755 --- a/archon.sh +++ b/archon.sh @@ -1,4 +1,4 @@ -#!/bin/bash +!/bin/bash # # # Archon -- Ελληνικός Arch Linux Installer From 6b472247c5b643499420031038eab81bac7d47c4 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Mon, 1 Jun 2020 12:13:44 +0300 Subject: [PATCH 055/106] Add review dog workflow --- .github/workflows/reviewdog.yml | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/reviewdog.yml diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml new file mode 100644 index 0000000..e3de0c4 --- /dev/null +++ b/.github/workflows/reviewdog.yml @@ -0,0 +1,37 @@ +# Workflow https://github.com/marketplace/actions/run-shellcheck-with-reviewdog + +name: Review Dog + +on: + push: + pull_request: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + shellcheck push: + runs-on: ubuntu-latest + steps: + - name: runner / shellcheck push + uses: actions/checkout@v2 + - name: shellcheck + uses: reviewdog/action-shellcheck@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-check # Change reporter. + pattern: "*.sh" # Optional. + exclude: "./.git/*" # Optional. + #level: info + #shellcheck_flags: --severity=style + shellcheck pull: + if: github.event_name == 'pull_request' + name: runner / shellcheck pul request + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: reviewdog/action-shellcheck@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review + pattern: "*.sh" # Optional. + exclude: "./.git/*" # Optional. From 7f973b7d7c26a394667c345599e8058d6746ced0 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Mon, 1 Jun 2020 12:18:27 +0300 Subject: [PATCH 056/106] fix test CI --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index 6b7f911..2822dd3 100755 --- a/archon.sh +++ b/archon.sh @@ -1,4 +1,4 @@ -!/bin/bash +#!/bin/bash # # # Archon -- Ελληνικός Arch Linux Installer From b1f8ab5d43b6a9d59802cf94560f951afa5df804 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Mon, 1 Jun 2020 12:21:19 +0300 Subject: [PATCH 057/106] Update reviewdog.yml --- .github/workflows/reviewdog.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index e3de0c4..67a667c 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -9,7 +9,7 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" - shellcheck push: + shellcheck: runs-on: ubuntu-latest steps: - name: runner / shellcheck push @@ -23,7 +23,7 @@ jobs: exclude: "./.git/*" # Optional. #level: info #shellcheck_flags: --severity=style - shellcheck pull: + shellcheck: if: github.event_name == 'pull_request' name: runner / shellcheck pul request runs-on: ubuntu-latest From 753f5d6d7d09a82aabbeee8458c0b6d9e1200e47 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Mon, 1 Jun 2020 12:23:54 +0300 Subject: [PATCH 058/106] fix 'shellcheck' is already defined --- .github/workflows/reviewdog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 67a667c..5fd89cd 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -23,7 +23,7 @@ jobs: exclude: "./.git/*" # Optional. #level: info #shellcheck_flags: --severity=style - shellcheck: + shellcheck_pr: if: github.event_name == 'pull_request' name: runner / shellcheck pul request runs-on: ubuntu-latest From 0b14709ccc6fb0758f5b55389606abb103922741 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Mon, 1 Jun 2020 12:25:47 +0300 Subject: [PATCH 059/106] keep only lint --- .github/workflows/main.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 02a9658..966d477 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,18 +17,3 @@ jobs: uses: actions/checkout@v1 - name: Run Shellcheck uses: azohra/shell-linter@latest - shellcheck: - runs-on: ubuntu-latest - steps: - - name: runner / shellcheck - uses: actions/checkout@v1 - - name: shellcheck - uses: reviewdog/action-shellcheck@v1 - with: - github_token: ${{ secrets.github_token }} - reporter: github-check # Change reporter. - level: info - shellcheck_flags: --severity=style - path: "." # Optional. - pattern: "*.sh" # Optional. - exclude: "./.git/*" # Optional. From 806feb9ae3290481dc2e3968bd984b811f084053 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Mon, 1 Jun 2020 12:29:39 +0300 Subject: [PATCH 060/106] bump to v2 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 966d477..235de2b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,6 +14,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Run Shellcheck uses: azohra/shell-linter@latest From 9a2cdcf78216512959ba39e00be217559e93d011 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Mon, 1 Jun 2020 12:36:16 +0300 Subject: [PATCH 061/106] Update reviewdog.yml --- .github/workflows/reviewdog.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 5fd89cd..0c7beae 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -12,7 +12,7 @@ jobs: shellcheck: runs-on: ubuntu-latest steps: - - name: runner / shellcheck push + - name: shellcheck push uses: actions/checkout@v2 - name: shellcheck uses: reviewdog/action-shellcheck@v1 @@ -24,8 +24,8 @@ jobs: #level: info #shellcheck_flags: --severity=style shellcheck_pr: - if: github.event_name == 'pull_request' - name: runner / shellcheck pul request + #if: github.event_name == 'pull_request' + name: shellcheck pull request runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From 2f4f5e1970dad8b11ac9b72a0ee3760054d2b0a4 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Mon, 1 Jun 2020 12:44:04 +0300 Subject: [PATCH 062/106] adding names --- .github/workflows/reviewdog.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 0c7beae..bdb79e9 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -12,9 +12,9 @@ jobs: shellcheck: runs-on: ubuntu-latest steps: - - name: shellcheck push + - name: Checkout code uses: actions/checkout@v2 - - name: shellcheck + - name: shellcheck github-check uses: reviewdog/action-shellcheck@v1 with: github_token: ${{ secrets.github_token }} @@ -28,8 +28,10 @@ jobs: name: shellcheck pull request runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: reviewdog/action-shellcheck@v1 + - name: Checkout code + uses: actions/checkout@v2 + - name: shellcheck github-pr-review + uses: reviewdog/action-shellcheck@v1 with: github_token: ${{ secrets.github_token }} reporter: github-pr-review From aaa112a7990fd1c535e296c6b32961a800afcc8e Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Mon, 1 Jun 2020 12:46:08 +0300 Subject: [PATCH 063/106] test removing " --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index 2822dd3..c07681f 100755 --- a/archon.sh +++ b/archon.sh @@ -25,7 +25,7 @@ NC='\033[0m' ########Filesystem Function################## function filesystems(){ - PS3="Επιλέξτε filesystem: " + PS3="Επιλέξτε filesystem: options=("ext4" "XFS (experimental)" "Btrfs (experimental)" "F2FS (experimental)") select opt in "${options[@]}" do From 5ff195541dafd6c9113ceb91bbb62d41bc9b855d Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Mon, 1 Jun 2020 12:48:58 +0300 Subject: [PATCH 064/106] fix removing " --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index c07681f..2822dd3 100755 --- a/archon.sh +++ b/archon.sh @@ -25,7 +25,7 @@ NC='\033[0m' ########Filesystem Function################## function filesystems(){ - PS3="Επιλέξτε filesystem: + PS3="Επιλέξτε filesystem: " options=("ext4" "XFS (experimental)" "Btrfs (experimental)" "F2FS (experimental)") select opt in "${options[@]}" do From e06ae1ce282654e93c102f4f4c5638e1d0b4f1c6 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Wed, 3 Jun 2020 15:55:49 +0300 Subject: [PATCH 065/106] =?UTF-8?q?=CE=A0=CF=81=CE=BF=CF=83=CE=B8=CE=AE?= =?UTF-8?q?=CE=BA=CE=B7=20swapfile=20=CE=BA=CE=B1=CE=B9=20=CE=B4=CE=B9?= =?UTF-8?q?=CE=B1=CF=87=CF=89=CF=81=CE=B9=CF=83=CE=BC=CF=8C=CF=82=20btrfs?= =?UTF-8?q?=20=CE=BC=CE=B5=20=CF=84=CE=B1=20=CF=85=CF=80=CF=8C=CE=BB=CE=BF?= =?UTF-8?q?=CE=B9=CF=80=CE=B1=20#94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 43 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/archon.sh b/archon.sh index 2822dd3..338549e 100755 --- a/archon.sh +++ b/archon.sh @@ -34,24 +34,31 @@ function filesystems(){ fsprogs="e2fsprogs" mkfs.ext4 "$diskvar""$diskletter""$disknumber" mount "$diskvar""$diskletter""$disknumber" "/mnt" + file_format="ext4" break ;; "XFS (experimental)") fsprogs="xfsprogs" mkfs.xfs "$diskvar""$diskletter""$disknumber" mount "$diskvar""$diskletter""$disknumber" "/mnt" + file_format="xfs" break ;; "Btrfs (experimental)") fsprogs="btrfs-progs" mkfs.btrfs "-f" "$diskvar""$diskletter""$disknumber" mount "$diskvar""$diskletter""$disknumber" "/mnt" + btrfs subvolume create /mnt/@ + umount /mnt + mount -o compress=zlib,subvol=/@ "$diskvar""$diskletter""$disknumber" /mnt + file_format="btrfs" break ;; "F2FS (experimental)") fsprogs="f2fs-tools" mkfs.f2fs "-f" "$diskvar""$diskletter""$disknumber" mount "$diskvar""$diskletter""$disknumber" "/mnt" + file_format="f2fs" break ;; *) echo -e "${IRed}Οι επιλογές σας πρέπει να είναι [1 ~ 4]. Παρακαλώ επιλέξτε σωστά !${NC}";; @@ -428,14 +435,35 @@ function chroot_stage { echo '--------------------------------------' sleep 2 ############################ Installing Zswap ############################### - pacman -S --noconfirm systemd-swap + #pacman -S --noconfirm systemd-swap #πλέον χρησιμοποιούμε swapfile # τα default του developer αλλάζουμε μόνο: - echo - { - echo "zswap_enabled=0" - echo "swapfc_enabled=1" - } >> /etc/systemd/swap.conf.d/systemd-swap.conf - systemctl enable systemd-swap + if YN_Q "Θέλετε να δημιουργήσετε swapfile (y/n); " "μη έγκυρος χαρακτήρας" ; then + read -rp "Τι μέγεθος να έχει το swapfile;(Σε MB)" swap_size + if [ "$file_format" == "btrfs" ]; then + mount "$diskvar""$diskletter""$disknumber" /mnt + btrfs subvolume create /mnt/@swap + umount /mnt + mkdir /swap + mount -o subvol=@swap "$diskvar""$diskletter""$disknumber" /swap + truncate -s 0 /swap/swapfile + chattr +C /swap/swapfile + btrfs property set /swap/swapfile compression none + dd if=/dev/zero of=/swap/swapfile bs=1M count="$swap_size" status=progress + chmod 600 /swap/swapfile + mkswap /swap/swapfile + echo ""$diskvar""$diskletter""$disknumber" /swap btrfs subvol=@swap 0 0 " >> /etc/fstab + echo "/swap/swapfile none swap defaults 0 0" >> /etc/fstab + else + touch /swapfile + dd if=/dev/zero of=/swapfile bs=1M count=$swap_size status=progress + chmod 600 /swapfile + mkswap /swapfile + echo '/swapfile none swap defaults 0 0' >> /etc/fstab + fi + else + echo -e "${IYellow}Έξοδος...${NC}" + exit 0 + fi echo "" echo '--------------------------------------' echo -e "${IGreen}BONUS - Εγκατάσταση Desktop${NC}" @@ -664,6 +692,7 @@ if [ -d /sys/firmware/efi ]; then #Η αρχική συνθήκη παραμέ disknumber="1" # Προσοχή οι γραμμές 646-647 αν μπουν πάνω από την filesystem υπάρχει πρόβλημα στο boot. mkdir "/mnt/boot" mount "$diskvar""$diskletter""$disknumber" "/mnt/boot" + disknumber="2" # Θα χρειαστεί στο swapfile το δεύτερο partition sleep 1 else echo From 8bc5d4e35993f9a70c7fd4860fffb3fad223a982 Mon Sep 17 00:00:00 2001 From: JohnGavr <47471932+JohnGavr@users.noreply.github.com> Date: Wed, 3 Jun 2020 16:00:52 +0300 Subject: [PATCH 066/106] ShellCheck Corrections #94 --- archon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archon.sh b/archon.sh index 338549e..6d1b6ab 100755 --- a/archon.sh +++ b/archon.sh @@ -451,11 +451,11 @@ function chroot_stage { dd if=/dev/zero of=/swap/swapfile bs=1M count="$swap_size" status=progress chmod 600 /swap/swapfile mkswap /swap/swapfile - echo ""$diskvar""$diskletter""$disknumber" /swap btrfs subvol=@swap 0 0 " >> /etc/fstab + echo """$diskvar""""$diskletter""""$disknumber"" /swap btrfs subvol=@swap 0 0 " >> /etc/fstab echo "/swap/swapfile none swap defaults 0 0" >> /etc/fstab else touch /swapfile - dd if=/dev/zero of=/swapfile bs=1M count=$swap_size status=progress + dd if=/dev/zero of=/swapfile bs=1M count="$swap_size" status=progress chmod 600 /swapfile mkswap /swapfile echo '/swapfile none swap defaults 0 0' >> /etc/fstab From f25ce8bc8b93fe5c299af22236a24b08a2de3351 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Thu, 4 Jun 2020 00:00:50 +0300 Subject: [PATCH 067/106] =?UTF-8?q?=CE=95=CE=B9=CF=83=CE=B1=CE=B3=CF=89?= =?UTF-8?q?=CE=B3=CE=AE=20=CE=BC=CE=B5=CF=84=CE=B1=CE=B2=CE=BB=CE=B7=CF=84?= =?UTF-8?q?=CF=8E=CE=BD=20=CF=83=CF=84=CE=BF=20var.txt=20=CE=91=CF=86?= =?UTF-8?q?=CE=B1=CE=AF=CF=81=CE=B5=CF=83=CE=B7=20compress?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index 338549e..e06651c 100755 --- a/archon.sh +++ b/archon.sh @@ -50,7 +50,7 @@ function filesystems(){ mount "$diskvar""$diskletter""$disknumber" "/mnt" btrfs subvolume create /mnt/@ umount /mnt - mount -o compress=zlib,subvol=/@ "$diskvar""$diskletter""$disknumber" /mnt + mount -o subvol=/@ "$diskvar""$diskletter""$disknumber" /mnt file_format="btrfs" break ;; @@ -439,6 +439,7 @@ function chroot_stage { # τα default του developer αλλάζουμε μόνο: if YN_Q "Θέλετε να δημιουργήσετε swapfile (y/n); " "μη έγκυρος χαρακτήρας" ; then read -rp "Τι μέγεθος να έχει το swapfile;(Σε MB)" swap_size + source var.txt # εισαγωγή των μεταβλητών file_format diskvar diskletter disknumber if [ "$file_format" == "btrfs" ]; then mount "$diskvar""$diskletter""$disknumber" /mnt btrfs subvolume create /mnt/@swap @@ -728,6 +729,15 @@ else esac done fi + +# Μεταβλητές που χρειάζονται όταν το file_format="btrfs" στο arch-chroot +if [[ "$file_format" == "btrfs" ]]; then + touch var.txt + echo "file_format=""$file_format" >> var.txt + echo "diskvar=""$diskvar" >> var.txt + echo "diskletter=""$diskletter" >> var.txt + echo "disknumber=""$disknumber" >> var.txt +fi sleep 1 echo echo @@ -757,6 +767,7 @@ echo ' Τώρα θα γίνει είσοδος στο εγκατεστημένο echo '--------------------------------------------------------' sleep 1 cp archon.sh /mnt/archon.sh +cp var.txt /mnt/var.txt #αντιγραφή του αρχείου στο σύστημα genfstab -U /mnt >> /mnt/etc/fstab arch-chroot /mnt ./archon.sh --stage chroot echo From 9ab72534e33c814d2700e9288abd8095b1ef79ab Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Thu, 4 Jun 2020 08:43:43 +0300 Subject: [PATCH 068/106] =?UTF-8?q?=CE=91=CE=BB=CE=BB=CE=B1=CE=B3=CE=AE=20?= =?UTF-8?q?=CF=83=CF=84=CE=BF=20=CF=84=CF=81=CF=8C=CF=80=CE=BF=20=CE=B4?= =?UTF-8?q?=CE=B9=CE=B1=CF=87=CE=B5=CE=AF=CF=81=CE=B9=CF=83=CE=B7=CF=82=20?= =?UTF-8?q?=CF=84=CE=BF=CF=85=20=CE=B1=CF=81=CF=87=CE=B5=CE=AF=CE=BF=CF=85?= =?UTF-8?q?=20var.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/archon.sh b/archon.sh index 3696983..20ac927 100755 --- a/archon.sh +++ b/archon.sh @@ -439,8 +439,8 @@ function chroot_stage { # τα default του developer αλλάζουμε μόνο: if YN_Q "Θέλετε να δημιουργήσετε swapfile (y/n); " "μη έγκυρος χαρακτήρας" ; then read -rp "Τι μέγεθος να έχει το swapfile;(Σε MB)" swap_size - source var.txt # εισαγωγή των μεταβλητών file_format diskvar diskletter disknumber - if [ "$file_format" == "btrfs" ]; then + if [ -f /var.txt ]; then + source var.txt mount "$diskvar""$diskletter""$disknumber" /mnt btrfs subvolume create /mnt/@swap umount /mnt @@ -730,14 +730,6 @@ else done fi -# Μεταβλητές που χρειάζονται όταν το file_format="btrfs" στο arch-chroot -if [[ "$file_format" == "btrfs" ]]; then - touch var.txt - echo "file_format=""$file_format" >> var.txt - echo "diskvar=""$diskvar" >> var.txt - echo "diskletter=""$diskletter" >> var.txt - echo "disknumber=""$disknumber" >> var.txt -fi sleep 1 echo echo @@ -766,6 +758,14 @@ echo ' ' echo ' Τώρα θα γίνει είσοδος στο εγκατεστημένο Arch Linux ' echo '--------------------------------------------------------' sleep 1 +# Μεταβλητές που χρειάζονται όταν το file_format="btrfs" στο arch-chroot +if [[ "$file_format" == "btrfs" ]]; then + touch var.txt + echo "diskvar=""$diskvar" >> var.txt + echo "diskletter=""$diskletter" >> var.txt + echo "disknumber=""$disknumber" >> var.txt + cp var.txt /mnt/var.txt #αντιγραφή του αρχείου στο σύστημα +fi cp archon.sh /mnt/archon.sh cp var.txt /mnt/var.txt #αντιγραφή του αρχείου στο σύστημα genfstab -U /mnt >> /mnt/etc/fstab From 43245a3021d7f306c19d4576cdd732a1eb6af740 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Thu, 4 Jun 2020 08:50:08 +0300 Subject: [PATCH 069/106] =?UTF-8?q?=CE=91=CF=86=CE=B1=CE=AF=CF=81=CE=B5?= =?UTF-8?q?=CF=83=CE=B7=20=CE=B4=CE=B9=CF=80=CE=BB=CE=BF=CF=8D=20cp=20var.?= =?UTF-8?q?txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archon.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/archon.sh b/archon.sh index 20ac927..e1a6563 100755 --- a/archon.sh +++ b/archon.sh @@ -767,7 +767,6 @@ if [[ "$file_format" == "btrfs" ]]; then cp var.txt /mnt/var.txt #αντιγραφή του αρχείου στο σύστημα fi cp archon.sh /mnt/archon.sh -cp var.txt /mnt/var.txt #αντιγραφή του αρχείου στο σύστημα genfstab -U /mnt >> /mnt/etc/fstab arch-chroot /mnt ./archon.sh --stage chroot echo From 8aa12bad895e0013bdb8f77aa0bbd43f68013480 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Thu, 4 Jun 2020 10:09:08 +0300 Subject: [PATCH 070/106] ShellCheck Correction --- archon.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/archon.sh b/archon.sh index e1a6563..3a77604 100755 --- a/archon.sh +++ b/archon.sh @@ -760,10 +760,11 @@ echo '--------------------------------------------------------' sleep 1 # Μεταβλητές που χρειάζονται όταν το file_format="btrfs" στο arch-chroot if [[ "$file_format" == "btrfs" ]]; then - touch var.txt - echo "diskvar=""$diskvar" >> var.txt - echo "diskletter=""$diskletter" >> var.txt - echo "disknumber=""$disknumber" >> var.txt + { + echo "diskvar=""$diskvar" + echo "diskletter=""$diskletter" + echo "disknumber=""$disknumber" + } >> var.txt cp var.txt /mnt/var.txt #αντιγραφή του αρχείου στο σύστημα fi cp archon.sh /mnt/archon.sh From abb8c033e40758b1705415a3f34a21a69da305bd Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 11:47:04 +0300 Subject: [PATCH 071/106] shellcheck_flags: '--external-sources' --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 235de2b..a1f65c0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,3 +17,5 @@ jobs: uses: actions/checkout@v2 - name: Run Shellcheck uses: azohra/shell-linter@latest + with: + shellcheck_flags: '--external-sources' From a639cf30a4a228dde86a82fae9c4577338aebf33 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 11:47:36 +0300 Subject: [PATCH 072/106] shellcheck_flags: '--external-sources' --- .github/workflows/reviewdog.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index bdb79e9..0e1da2c 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -21,6 +21,7 @@ jobs: reporter: github-check # Change reporter. pattern: "*.sh" # Optional. exclude: "./.git/*" # Optional. + shellcheck_flags: '--external-sources' #level: info #shellcheck_flags: --severity=style shellcheck_pr: @@ -37,3 +38,4 @@ jobs: reporter: github-pr-review pattern: "*.sh" # Optional. exclude: "./.git/*" # Optional. + shellcheck_flags: '--external-sources' From 4927462f9701a9c697da0413571afce4bf033b50 Mon Sep 17 00:00:00 2001 From: JohnGavr <47471932+JohnGavr@users.noreply.github.com> Date: Thu, 4 Jun 2020 11:53:38 +0300 Subject: [PATCH 073/106] Update main.yml --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 235de2b..a1f65c0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,3 +17,5 @@ jobs: uses: actions/checkout@v2 - name: Run Shellcheck uses: azohra/shell-linter@latest + with: + shellcheck_flags: '--external-sources' From e5e15e75578585398601f48125b75bf3647feb25 Mon Sep 17 00:00:00 2001 From: JohnGavr <47471932+JohnGavr@users.noreply.github.com> Date: Thu, 4 Jun 2020 11:54:04 +0300 Subject: [PATCH 074/106] Update reviewdog.yml --- .github/workflows/reviewdog.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index bdb79e9..0e1da2c 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -21,6 +21,7 @@ jobs: reporter: github-check # Change reporter. pattern: "*.sh" # Optional. exclude: "./.git/*" # Optional. + shellcheck_flags: '--external-sources' #level: info #shellcheck_flags: --severity=style shellcheck_pr: @@ -37,3 +38,4 @@ jobs: reporter: github-pr-review pattern: "*.sh" # Optional. exclude: "./.git/*" # Optional. + shellcheck_flags: '--external-sources' From 0372882b0797f2e7c743292cea1cadcf9763f0c2 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 12:04:53 +0300 Subject: [PATCH 075/106] args: --external-sources --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a1f65c0..27eb695 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,4 +18,4 @@ jobs: - name: Run Shellcheck uses: azohra/shell-linter@latest with: - shellcheck_flags: '--external-sources' + args: '--external-sources' From a24cfaf6290b69723f3b7296f5eb8c2868a12798 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 12:07:20 +0300 Subject: [PATCH 076/106] Update reviewdog.yml --- .github/workflows/reviewdog.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 0e1da2c..684d465 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -21,7 +21,7 @@ jobs: reporter: github-check # Change reporter. pattern: "*.sh" # Optional. exclude: "./.git/*" # Optional. - shellcheck_flags: '--external-sources' + shellcheck_flags: --external-sources #level: info #shellcheck_flags: --severity=style shellcheck_pr: @@ -38,4 +38,4 @@ jobs: reporter: github-pr-review pattern: "*.sh" # Optional. exclude: "./.git/*" # Optional. - shellcheck_flags: '--external-sources' + shellcheck_flags: --external-sources From b875311ff2f026901f1e0c244d21ec872286ccab Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 12:08:01 +0300 Subject: [PATCH 077/106] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a1f65c0..f410e49 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,4 +18,4 @@ jobs: - name: Run Shellcheck uses: azohra/shell-linter@latest with: - shellcheck_flags: '--external-sources' + args: --external-sources From d013fe0228c2e09d7abbc4caa8ff7c7d9315fca4 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 12:10:11 +0300 Subject: [PATCH 078/106] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 27eb695..f410e49 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,4 +18,4 @@ jobs: - name: Run Shellcheck uses: azohra/shell-linter@latest with: - args: '--external-sources' + args: --external-sources From 22c7cbdfe17bfe65167fc839b04b31b98f489a9e Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 12:12:37 +0300 Subject: [PATCH 079/106] v2 --- .github/workflows/reviewdog.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 684d465..f2d07b6 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: shellcheck github-check - uses: reviewdog/action-shellcheck@v1 + uses: reviewdog/action-shellcheck@v2 with: github_token: ${{ secrets.github_token }} reporter: github-check # Change reporter. @@ -32,7 +32,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: shellcheck github-pr-review - uses: reviewdog/action-shellcheck@v1 + uses: reviewdog/action-shellcheck@v2 with: github_token: ${{ secrets.github_token }} reporter: github-pr-review From 20817a3a829efe80d12e3842b3ac558fae6a29b1 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 12:14:04 +0300 Subject: [PATCH 080/106] rever to v1 --- .github/workflows/reviewdog.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index f2d07b6..684d465 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: shellcheck github-check - uses: reviewdog/action-shellcheck@v2 + uses: reviewdog/action-shellcheck@v1 with: github_token: ${{ secrets.github_token }} reporter: github-check # Change reporter. @@ -32,7 +32,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: shellcheck github-pr-review - uses: reviewdog/action-shellcheck@v2 + uses: reviewdog/action-shellcheck@v1 with: github_token: ${{ secrets.github_token }} reporter: github-pr-review From db5c908d450c88bdf41decf4ac1b46af90cf92e0 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Thu, 4 Jun 2020 12:46:01 +0300 Subject: [PATCH 081/106] Delete var.txt and export variables --- archon.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/archon.sh b/archon.sh index 3a77604..34765b7 100755 --- a/archon.sh +++ b/archon.sh @@ -439,8 +439,7 @@ function chroot_stage { # τα default του developer αλλάζουμε μόνο: if YN_Q "Θέλετε να δημιουργήσετε swapfile (y/n); " "μη έγκυρος χαρακτήρας" ; then read -rp "Τι μέγεθος να έχει το swapfile;(Σε MB)" swap_size - if [ -f /var.txt ]; then - source var.txt + if [[ "$file_format" == "btrfs" ]]; then mount "$diskvar""$diskletter""$disknumber" /mnt btrfs subvolume create /mnt/@swap umount /mnt @@ -760,12 +759,10 @@ echo '--------------------------------------------------------' sleep 1 # Μεταβλητές που χρειάζονται όταν το file_format="btrfs" στο arch-chroot if [[ "$file_format" == "btrfs" ]]; then - { - echo "diskvar=""$diskvar" - echo "diskletter=""$diskletter" - echo "disknumber=""$disknumber" - } >> var.txt - cp var.txt /mnt/var.txt #αντιγραφή του αρχείου στο σύστημα + export file_format="$file_format" + export diskvar="$diskvar" + export disknumber="$disknumber" + export diskletter="$diskletter" fi cp archon.sh /mnt/archon.sh genfstab -U /mnt >> /mnt/etc/fstab From 90efe174226a2e5d1925e3ddc5d6d2d43eda1e27 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 15:12:48 +0300 Subject: [PATCH 082/106] rebase to current develop --- archon.sh | 171 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 113 insertions(+), 58 deletions(-) diff --git a/archon.sh b/archon.sh index 9c1d6c3..287a7c9 100755 --- a/archon.sh +++ b/archon.sh @@ -26,7 +26,7 @@ NC='\033[0m' ########Filesystem Function################## function filesystems(){ PS3="Επιλέξτε filesystem: " - options=("ext4" "XFS" "Btrfs" "F2FS") + options=("ext4" "XFS (experimental)" "Btrfs (experimental)" "F2FS (experimental)") select opt in "${options[@]}" do case $opt in # Η diskletter παίρνει τιμή μόνο αν είναι nvme ο δίσκος @@ -34,27 +34,34 @@ function filesystems(){ fsprogs="e2fsprogs" mkfs.ext4 "$diskvar""$diskletter""$disknumber" mount "$diskvar""$diskletter""$disknumber" "/mnt" + file_format="ext4" break ;; - "XFS") + "XFS (experimental)") fsprogs="xfsprogs" mkfs.xfs "$diskvar""$diskletter""$disknumber" mount "$diskvar""$diskletter""$disknumber" "/mnt" + file_format="xfs" break ;; - "Btrfs") + "Btrfs (experimental)") fsprogs="btrfs-progs" mkfs.btrfs "-f" "$diskvar""$diskletter""$disknumber" mount "$diskvar""$diskletter""$disknumber" "/mnt" + btrfs subvolume create /mnt/@ + umount /mnt + mount -o subvol=/@ "$diskvar""$diskletter""$disknumber" /mnt + file_format="btrfs" break ;; - "F2FS") + "F2FS (experimental)") fsprogs="f2fs-tools" mkfs.f2fs "-f" "$diskvar""$diskletter""$disknumber" mount "$diskvar""$diskletter""$disknumber" "/mnt" + file_format="f2fs" break ;; - *) echo -e "${IRed}Οι επιλογές σας πρέπει να είναι [1 ~ 4]. Παρακαλώ προσπαθήστε ξανα!${NC}";; + *) echo -e "${IRed}Οι επιλογές σας πρέπει να είναι [1 ~ 4]. Παρακαλώ επιλέξτε σωστά !${NC}";; esac done } @@ -79,17 +86,17 @@ function check_if_in_VM() { sleep 2 } - -function installer() { - echo -e "${IGreen}Εγκατάσταση $1 ...${NC}" - if pacman -S --noconfirm $2 - then - echo -e "${IGreen}[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $1 ...${NC}" - else - echo -e "${IRed}[ ΑΠΕΤΥΧΕ ] Εγκατάσταση $1 ...${NC}" - fi -} - +# Still produces : target not found +#function installer() { +# echo -e "${IGreen}Εγκατάσταση $1 ...${NC}" +# if pacman -S --noconfirm "${@:2}" +# then +# echo -e "${IGreen}[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $1 ...${NC}" +# else +# echo -e "${IRed}[ ΑΠΕΤΥΧΕ ] Εγκατάσταση $1 ...${NC}" +# fi +# +#} # Check Net Connection | If it is off , exit immediately # function check_net_connection() { @@ -108,7 +115,9 @@ function check_net_connection() { function initialize_desktop_selection() { sleep 2 - installer "Xorg Server" "xorg xorg-server xorg-xinit alsa-utils alsa-firmware pulseaudio noto-fonts" # Εγκατάσταση Xorg Server + echo "Εγκατάσταση Xorg Server" + sudo pacman -S --noconfirm xorg xorg-server xorg-xinit alsa-utils alsa-firmware pulseaudio noto-fonts + #installer "Xorg Server" "xorg xorg-server xorg-xinit alsa-utils alsa-firmware pulseaudio noto-fonts" # Εγκατάσταση Xorg Server PS3='Επιλέξτε ένα από τα διαθέσιμα γραφικά περιβάλλοντα : ' options=("GNOME" "Mate" "Deepin" "Xfce" "KDE" "LXQt" "Cinnamon" "Budgie" "i3" "Enlightenment" "UKUI" "Fluxbox" "Sugar" "Twm" "Έξοδος") @@ -118,52 +127,59 @@ function initialize_desktop_selection() { case "$choice" in "GNOME") echo -e "${IGreen}Εγκατάσταση GNOME Desktop Environment ...\n${NC}" - installer "GNOME Desktop" "gnome gnome-extra" + sudo pacman -S --noconfirm gnome gnome-extra + #installer "GNOME Desktop" "gnome gnome-extra" sudo systemctl enable gdm sudo systemctl enable NetworkManager exit 0 ;; "Mate") echo -e "${IGreen}Εγκατάσταση Mate Desktop Environment ... \n${NC}" - installer "Mate Desktop" "mate mate-extra networkmanager network-manager-applet" - installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" + sudo pacman -S --noconfirm mate mate-extra lightdm lightdm-gtk-greeter + #installer "Mate Desktop" "mate mate-extra networkmanager network-manager-applet" + #installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm sudo systemctl enable NetworkManager exit 0 ;; "Deepin") echo -e "${IGreen}Εγκατάσταση Deepin Desktop Environment ...\n${NC}" - installer "Deepin Desktop" "deepin deepin-extra networkmanager" + sudo pacman -S --noconfirm deepin deepin-extra networkmanager + #installer "Deepin Desktop" "deepin deepin-extra networkmanager" sudo systemctl enable lightdm sudo systemctl enable NetworkManager exit 0 ;; "Xfce") echo -e "${IGreen}Εγκατάσταση Xfce Desktop Environment ... \n${NC}" - installer "Xfce Desktop" "xfce4 xfce4-goodies pavucontrol networkmanager network-manager-applet" - installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" + sudo pacman -S --noconfirm xfce4 xfce4-goodies pavucontrol networkmanager network-manager-applet lightdm lightdm-gtk-greeter + #installer "Xfce Desktop" "xfce4 xfce4-goodies pavucontrol networkmanager network-manager-applet" + #installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm sudo systemctl enable NetworkManager exit 0 ;; "KDE") echo -e "${IGreen}Εγκατάσταση KDE Desktop Environment ... \n${NC}" - installer "KDE Desktop" "plasma-meta konsole dolphin" + sudo pacman -S --noconfirm plasma-meta konsole dolphin + #installer "KDE Desktop" "plasma-meta konsole dolphin" sudo systemctl enable sddm sudo systemctl enable NetworkManager exit 0 ;; "LXQt") echo -e "${IGreen}Εγκατάσταση LXQt Desktop Environment ... \n${NC}" - installer "LXQt Desktop" "lxqt breeze-icons" - installer "SDDM Display Manager" "sddm" + sudo pacman -S --noconfirm lxqt breeze-icons sddm + #installer "LXQt Desktop" "lxqt breeze-icons" + #installer "SDDM Display Manager" "sddm" sudo systemctl enable sddm sudo systemctl enable NetworkManager exit 0 ;; "Cinnamon") echo -e "${IGreen}Εγκατάσταση Cinnamon Desktop Environment ... \n${NC}" - installer "Cinnamon Desktop" "cinnamon xterm networkmanager" + sudo pacman -S --noconfirm cinnamon xterm networkmanager lightdm lightdm-gtk-greeter + #installer "Cinnamon Desktop" "cinnamon xterm networkmanager" installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm sudo systemctl enable NetworkManager @@ -171,54 +187,62 @@ function initialize_desktop_selection() { ;; "Budgie") echo -e "${IGreen}Εγκατάσταση Budgie Desktop Environment ... \n${NC}" - installer "Budgie Desktop" "budgie-desktop budgie-extras xterm networkmanager network-manager-applet" - installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" + sudo pacman -S --noconfirm budgie-desktop budgie-extras xterm networkmanager network-manager-applet lightdm lightdm-gtk-greeter + #installer "Budgie Desktop" "budgie-desktop budgie-extras xterm networkmanager network-manager-applet" + #installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm sudo systemctl enable NetworkManager exit 0 ;; "i3") echo -e "${IGreen}Εγκατάσταση i3 Desktop Environment ... \n${NC}" - installer "i3 Desktop" "i3 dmenu rxvt-unicode" - echo -e '#!/bin/bash \nexec i3' > /home/$USER/.xinitrc + sudo pacman -S --noconfirm i3 dmenu rxvt-unicode + #installer "i3 Desktop" "i3 dmenu rxvt-unicode" + echo -e '#!/bin/bash \nexec i3' > /home/"$USER"/.xinitrc exit 0 ;; "Enlightenment") echo -e "${IGreen}Εγκατάσταση Enlightenment Desktop Environment ... \n${NC}" - installer "Enlightenment Desktop" "enlightenment terminology connman" - installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" + sudo pacman -S --noconfirm enlightenment terminology connman acpid lightdm lightdm-gtk-greeter + #installer "Enlightenment Desktop" "enlightenment terminology connman acpid" #acpid and iwd need investigation + #installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm + sudo systemctl enable acpid sudo systemctl enable connman.service exit 0 ;; "UKUI") echo -e "${IGreen}Εγκατάσταση UKUI Desktop Environment ... \n${NC}" - installer "UKUI Desktop" "ukui xterm networkmanager network-manager-applet" + sudo pacman -S --noconfirm ukui xterm networkmanager network-manager-applet + #installer "UKUI Desktop" "ukui xterm networkmanager network-manager-applet" sudo systemctl enable lightdm sudo systemctl enable NetworkManager exit 0 ;; "Fluxbox") echo -e "${IGreen}Εγκατάσταση Fluxbox Desktop Environment ... \n${NC}" - installer "Fluxbox Desktop" "fluxbox xterm menumaker" - echo -e '#!/bin/bash \nstartfluxbox' > /home/$USER/.xinitrc + sudo pacman -S --noconfirm fluxbox xterm menumaker + #installer "Fluxbox Desktop" "fluxbox xterm menumaker" + echo -e '#!/bin/bash \nstartfluxbox' > /home/"$USER"/.xinitrc exit 0 ;; "Sugar") echo -e "${IGreen}Εγκατάσταση Sugar Desktop Environment ... \n${NC}" - installer "Sugar Desktop" "sugar sugar-fructose xterm" - installer "LXDM Display Manager" "lxdm" + sudo pacman -S --noconfirm sugar sugar-fructose xterm lxdm + #installer "Sugar Desktop" "sugar sugar-fructose xterm" + #installer "LXDM Display Manager" "lxdm" sudo systemctl enable lxdm sudo systemctl enable NetworkManager exit 0 ;; "Twm") echo -e "${IGreen}Εγκατάσταση Twm Desktop Environment ... \n${NC}" - installer "Twm Desktop" "xorg-twm xterm xorg-xclock" + sudo pacman -S --noconfirm xorg-twm xterm xorg-xclock + #installer "Twm Desktop" "xorg-twm xterm xorg-xclock" exit 0 ;; "Έξοδος") - echo -e "${IYellow}Έξοδος όπως επιλέχθηκε από το χρήστη "${USER}"${NC}" + echo -e "${IYellow}Έξοδος όπως επιλέχθηκε από το χρήστη ${USER}${NC}" exit 0 ;; *) @@ -279,7 +303,7 @@ function chroot_stage { if [ "$wifi" = "" ]; then # Έλεγχος αν υπάρχει κάρτα wifi echo -e "${IYellow}Δε βρέθηκε ασύρματη κάρτα δικτύου${NC}" # και αν υπάρχει γίνεται εγκατάσταση else # και ενεργοποίηση - pacman -S --noconfirm iw wpa_supplicant dialog netctl + pacman -S --noconfirm iw wpa_supplicant dialog netctl wireless-regdb crda # CRDA/wireless-regdb : https://wiki.archlinux.org/index.php/Network_configuration/Wireless#Respecting_the_regulatory_domain systemctl enable netctl-auto@"$wifi".service echo -e "${IGreen}Η ασύρματη κάρτα δικτύου $wifi ρυθμίστηκε επιτυχώς${NC}" fi @@ -333,13 +357,13 @@ function chroot_stage { mkdir media cd media cd / - if [ $filesize -ne 0 ]; then + if [ "$filesize" -ne 0 ]; then num=0 while IFS='' read -r line || [[ -n "$line" ]]; do - num=$(( $num + 1 )) + num=$(( num + 1 )) echo $num mkdir /run/media/disk$num - mount $line /run/media/disk$num | echo -e "${IYellow}Προσαρτάται ο..."$num"oς δίσκος${NC}" + mount "$line" /run/media/disk$num && echo -e "${IYellow}Προσαρτάται ο... $num oς δίσκος${NC}" sleep 1 done < "disks.txt" @@ -411,14 +435,35 @@ function chroot_stage { echo '--------------------------------------' sleep 2 ############################ Installing Zswap ############################### - pacman -S --noconfirm systemd-swap + #pacman -S --noconfirm systemd-swap #πλέον χρησιμοποιούμε swapfile # τα default του developer αλλάζουμε μόνο: - echo - { - echo "zswap_enabled=0" - echo "swapfc_enabled=1" - } >> /etc/systemd/swap.conf.d/systemd-swap.conf - systemctl enable systemd-swap + if YN_Q "Θέλετε να δημιουργήσετε swapfile (y/n); " "μη έγκυρος χαρακτήρας" ; then + read -rp "Τι μέγεθος να έχει το swapfile;(Σε MB)" swap_size + if [[ "$file_format" == "btrfs" ]]; then + mount "$diskvar""$diskletter""$disknumber" /mnt + btrfs subvolume create /mnt/@swap + umount /mnt + mkdir /swap + mount -o subvol=@swap "$diskvar""$diskletter""$disknumber" /swap + truncate -s 0 /swap/swapfile + chattr +C /swap/swapfile + btrfs property set /swap/swapfile compression none + dd if=/dev/zero of=/swap/swapfile bs=1M count="$swap_size" status=progress + chmod 600 /swap/swapfile + mkswap /swap/swapfile + echo """$diskvar""""$diskletter""""$disknumber"" /swap btrfs subvol=@swap 0 0 " >> /etc/fstab + echo "/swap/swapfile none swap defaults 0 0" >> /etc/fstab + else + touch /swapfile + dd if=/dev/zero of=/swapfile bs=1M count="$swap_size" status=progress + chmod 600 /swapfile + mkswap /swapfile + echo '/swapfile none swap defaults 0 0' >> /etc/fstab + fi + else + echo -e "${IYellow}Έξοδος...${NC}" + exit 0 + fi echo "" echo '--------------------------------------' echo -e "${IGreen}BONUS - Εγκατάσταση Desktop${NC}" @@ -494,8 +539,8 @@ echo "---------------------------------------------------------" num=0 while IFS='' read -r line || [[ -n "$line" ]]; do - num=$(( $num + 1 )) - echo "["$num"]" $line + num=$(( num + 1 )) + echo "[$num]" "$line" done < disks echo "---------------------------------------------------------" read -rp "Επιλέξτε δίσκο για εγκατάσταση (Q/q για έξοδο): " input @@ -507,18 +552,18 @@ if [[ $input = "q" ]] || [[ $input = "Q" ]] exit 0 fi -if [ $input -gt 0 ] && [ $input -le $num ]; #έλεγχος αν το input είναι μέσα στο εύρος της λίστας +if [ "$input" -gt 0 ] && [ "$input" -le $num ]; #έλεγχος αν το input είναι μέσα στο εύρος της λίστας then if [[ $1 = "grub" ]]; # αν προστεθεί το όρισμα grub τότε η μεταβλητή που θα αποθηκευτεί then # θα είναι η grubvar - grubvar="/dev/"$(cat disks | head -n$(( $input )) | tail -n1 ) - echo Διάλεξατε τον $grubvar + grubvar="/dev/"$(cat < disks | head -n$(( input )) | tail -n1 ) + echo Διάλεξατε τον "$grubvar" else - diskvar="/dev/"$(cat disks | head -n$(( $input )) | tail -n1 ) + diskvar="/dev/"$(cat < disks | head -n$(( input )) | tail -n1 ) if [[ "$diskvar" = *"/dev/nvme0n"[1-9]* ]]; then #Εκχώρηση τιμής στην diskletter αν είναι nvme ο δίσκος. diskletter="p" fi - echo Διάλεξατε τον $diskvar + echo Διάλεξατε τον "$diskvar" fi break else @@ -647,6 +692,7 @@ if [ -d /sys/firmware/efi ]; then #Η αρχική συνθήκη παραμέ disknumber="1" # Προσοχή οι γραμμές 646-647 αν μπουν πάνω από την filesystem υπάρχει πρόβλημα στο boot. mkdir "/mnt/boot" mount "$diskvar""$diskletter""$disknumber" "/mnt/boot" + disknumber="2" # Θα χρειαστεί στο swapfile το δεύτερο partition sleep 1 else echo @@ -682,6 +728,7 @@ else esac done fi + sleep 1 echo echo @@ -710,6 +757,13 @@ echo ' ' echo ' Τώρα θα γίνει είσοδος στο εγκατεστημένο Arch Linux ' echo '--------------------------------------------------------' sleep 1 +# Μεταβλητές που χρειάζονται όταν το file_format="btrfs" στο arch-chroot +if [[ "$file_format" == "btrfs" ]]; then + export file_format="$file_format" + export diskvar="$diskvar" + export disknumber="$disknumber" + export diskletter="$diskletter" +fi cp archon.sh /mnt/archon.sh genfstab -U /mnt >> /mnt/etc/fstab arch-chroot /mnt ./archon.sh --stage chroot @@ -721,3 +775,4 @@ echo ' Μπορείτε να επανεκκινήσετε το σύστημά σ echo '--------------------------------------------------------' sleep 5 exit + From d8fc2dce445518da520a84f39819ffb79b0c0f9f Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 15:18:26 +0300 Subject: [PATCH 083/106] fix -uses --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7f1ea17..ca60a14 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,3 @@ -# This is a basic workflow to help you get started with Actions - name: CI # Controls when the action will run. Triggers the workflow on push or pull request @@ -14,6 +12,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Run Shellcheck - uses: azohra/shell-linter@latest \ No newline at end of file + uses: azohra/shell-linter@latest + with: + args: --external-sources \ No newline at end of file From 510960f908a9833f3db700ada93634ea234b8e04 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 15:23:33 +0300 Subject: [PATCH 084/106] added missing reviewdog --- .github/workflows/reviewdog.yml | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/reviewdog.yml diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml new file mode 100644 index 0000000..0e1da2c --- /dev/null +++ b/.github/workflows/reviewdog.yml @@ -0,0 +1,41 @@ +# Workflow https://github.com/marketplace/actions/run-shellcheck-with-reviewdog + +name: Review Dog + +on: + push: + pull_request: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + shellcheck: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: shellcheck github-check + uses: reviewdog/action-shellcheck@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-check # Change reporter. + pattern: "*.sh" # Optional. + exclude: "./.git/*" # Optional. + shellcheck_flags: '--external-sources' + #level: info + #shellcheck_flags: --severity=style + shellcheck_pr: + #if: github.event_name == 'pull_request' + name: shellcheck pull request + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: shellcheck github-pr-review + uses: reviewdog/action-shellcheck@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review + pattern: "*.sh" # Optional. + exclude: "./.git/*" # Optional. + shellcheck_flags: '--external-sources' From 1aa2d90690ed99e43e3ab25dc162781d3bbd3a58 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 15:30:10 +0300 Subject: [PATCH 085/106] meh --- archon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archon.sh b/archon.sh index 0a15045..14bd2b7 100755 --- a/archon.sh +++ b/archon.sh @@ -721,7 +721,7 @@ else parted "$diskvar" mkpart primary 1 3 parted "$diskvar" set 1 bios_grub on parted "$diskvar" mkpart primary ext4 3MiB 100% - filesystems​ + filesystems break ;; *) echo -e "${IRed}Οι επιλογές σας πρέπει να είναι [1 ή 2]. Παρακαλώ προσπαθήστε ξανα!${NC}";; @@ -774,4 +774,4 @@ echo -e "${IGreen} Τέλος εγκατάστασης${NC} echo ' Μπορείτε να επανεκκινήσετε το σύστημά σας ' echo '--------------------------------------------------------' sleep 5 -exit +exit \ No newline at end of file From a0a72a590668cdc0374d03dc7cd754fbabf8bb8c Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 15:31:42 +0300 Subject: [PATCH 086/106] indent --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index 14bd2b7..833bf6c 100755 --- a/archon.sh +++ b/archon.sh @@ -770,7 +770,7 @@ arch-chroot /mnt ./archon.sh --stage chroot echo echo echo '--------------------------------------------------------' -echo -e "${IGreen} Τέλος εγκατάστασης${NC} " +echo -e "${IGreen} Τέλος εγκατάστασης${NC} " echo ' Μπορείτε να επανεκκινήσετε το σύστημά σας ' echo '--------------------------------------------------------' sleep 5 From 22ba4522e9c868764ebef0584d2ad2b11634a31a Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 15:36:27 +0300 Subject: [PATCH 087/106] delete archon.sh --- archon.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/archon.sh b/archon.sh index 833bf6c..71df212 100755 --- a/archon.sh +++ b/archon.sh @@ -774,4 +774,5 @@ echo -e "${IGreen} Τέλος εγκατάστασης${NC} " echo ' Μπορείτε να επανεκκινήσετε το σύστημά σας ' echo '--------------------------------------------------------' sleep 5 +rm archon.sh # διαγραφή του archon απο το / exit \ No newline at end of file From 610a763a654cd64932e14130615b446f1192b137 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Thu, 4 Jun 2020 18:36:20 +0300 Subject: [PATCH 088/106] Add option to create subvolume @home --- archon.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/archon.sh b/archon.sh index 34765b7..9cccd1c 100755 --- a/archon.sh +++ b/archon.sh @@ -49,8 +49,15 @@ function filesystems(){ mkfs.btrfs "-f" "$diskvar""$diskletter""$disknumber" mount "$diskvar""$diskletter""$disknumber" "/mnt" btrfs subvolume create /mnt/@ - umount /mnt - mount -o subvol=/@ "$diskvar""$diskletter""$disknumber" /mnt + if YN_Q "Θέλετε να προστεθεί subvolume home (y/n); " "μη έγκυρος χαρακτήρας" ; then + btrfs subvolume create /mnt/@home + umount /mnt + mount -o subvol=/@ "$diskvar""$diskletter""$disknumber" /mnt + mount -o subvol=/@home "$diskvar""$diskletter""$disknumber" /mnt/home + else + umount /mnt + mount -o subvol=/@ "$diskvar""$diskletter""$disknumber" /mnt + fi file_format="btrfs" break ;; From 2a579863dfe003fd621e1b48e56319f3b42ac5ed Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Thu, 4 Jun 2020 18:38:16 +0300 Subject: [PATCH 089/106] Correction to subvolume @home --- archon.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/archon.sh b/archon.sh index 9cccd1c..a01cc0d 100755 --- a/archon.sh +++ b/archon.sh @@ -53,6 +53,7 @@ function filesystems(){ btrfs subvolume create /mnt/@home umount /mnt mount -o subvol=/@ "$diskvar""$diskletter""$disknumber" /mnt + mkdir -p /mnt/home mount -o subvol=/@home "$diskvar""$diskletter""$disknumber" /mnt/home else umount /mnt From a7a649237027497aee385163237ad36dadddcb84 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Thu, 4 Jun 2020 19:07:37 +0300 Subject: [PATCH 090/106] Remove multilib and 14 steps #101 --- archon.sh | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/archon.sh b/archon.sh index d8171f4..a4936e4 100755 --- a/archon.sh +++ b/archon.sh @@ -419,22 +419,8 @@ function chroot_stage { echo "$onomaxristi ALL=(ALL) ALL" >> /etc/sudoers echo echo - echo '-------------------------------------' - echo -e "${IGreen}14 - Προσθήκη Multilib${NC} " - echo ' ' - echo 'Θα προστεθεί δυνατότητα για πρόσβαση ' - echo 'σε 32bit προγράμματα και βιβλιοθήκες ' - echo 'που απαιτούν κάποιες εφαρμογές ' - echo '-------------------------------------' - sleep 2 - echo - { - echo "[multilib]" - echo "Include = /etc/pacman.d/mirrorlist" - } >> /etc/pacman.conf - pacman -Syy echo '--------------------------------------' - echo -e "${IGreen}15 - Προσθήκη SWAP${NC} " + echo -e "${IGreen}14 - Προσθήκη SWAP${NC} " echo ' ' echo 'Θα χρησιμοποιηθεί το systemd-swap αντί' echo 'για διαμέρισμα SWAP ώστε το μέγεθός ' @@ -617,7 +603,7 @@ sleep 1 echo ' Σκοπός αυτού του cli εγκαταστάτη είναι η εγκατάσταση του' echo ' βασικού συστήματος Arch Linux ΧΩΡΙΣ γραφικό περιβάλλον.' echo '' -echo ' Η διαδικασία ολοκληρώνεται σε 15 βήματα' +echo ' Η διαδικασία ολοκληρώνεται σε 14 βήματα' echo '' echo ' Προτείνεται η εγκατάσταση σε ξεχωριστό δίσκο για την ' echo ' αποφυγή σπασίματος του συστήματος σας. ' From 7676c02f84eec0f0496bec22213e82eaa2f05baa Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Thu, 4 Jun 2020 20:28:58 +0300 Subject: [PATCH 091/106] Delete script when install finish --- archon.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/archon.sh b/archon.sh index a4936e4..ca1e298 100755 --- a/archon.sh +++ b/archon.sh @@ -761,6 +761,7 @@ fi cp archon.sh /mnt/archon.sh genfstab -U /mnt >> /mnt/etc/fstab arch-chroot /mnt ./archon.sh --stage chroot +rm /mnt/archon.sh #διαγραφή του script από το / του συστήματος echo echo echo '--------------------------------------------------------' From b6307cec8dbb936caba0e628319a6c1375c9ac3d Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 21:19:48 +0300 Subject: [PATCH 092/106] remove dup rm archon.sh --- archon.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/archon.sh b/archon.sh index de8b530..7cda4c7 100755 --- a/archon.sh +++ b/archon.sh @@ -769,5 +769,4 @@ echo -e "${IGreen} Τέλος εγκατάστασης${NC} " echo ' Μπορείτε να επανεκκινήσετε το σύστημά σας ' echo '--------------------------------------------------------' sleep 5 -rm archon.sh # διαγραφή του archon απο το / exit \ No newline at end of file From b38a7ee5be389a593067c5ce7d8a52b34128c333 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 23:01:35 +0300 Subject: [PATCH 093/106] change old message for SWAP --- archon.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/archon.sh b/archon.sh index 7cda4c7..38174bb 100755 --- a/archon.sh +++ b/archon.sh @@ -420,20 +420,19 @@ function chroot_stage { echo echo echo '--------------------------------------' - echo -e "${IGreen}14 - Προσθήκη SWAP${NC} " + echo -e "${IGreen}14 - Προσθήκη SWAP file${NC} " echo ' ' - echo 'Θα χρησιμοποιηθεί το systemd-swap αντί' - echo 'για διαμέρισμα SWAP ώστε το μέγεθός ' - echo 'του να μεγαλώνει εάν και εφόσoν το ' - echo 'απαιτεί το σύστημα ' + echo 'Εάν θέλετε, μπορεί να δημιουργηθεί ' + echo 'SWAP file. Για το μέγεθός του μπορείτε' + echo 'να γράψετε έναν αριθμό σε MB. π.χ 4096' + echo 'για να δημιουργηθεί 4GB swap file ' echo '--------------------------------------' sleep 2 - ############################ Installing Zswap ############################### - #pacman -S --noconfirm systemd-swap #πλέον χρησιμοποιούμε swapfile - # τα default του developer αλλάζουμε μόνο: + echo if YN_Q "Θέλετε να δημιουργήσετε swapfile (y/n); " "μη έγκυρος χαρακτήρας" ; then + echo read -rp "Τι μέγεθος να έχει το swapfile;(Σε MB)" swap_size - if [[ "$file_format" == "btrfs" ]]; then + if [[ "$file_format" == "btrfs" ]]; then mount "$diskvar""$diskletter""$disknumber" /mnt btrfs subvolume create /mnt/@swap umount /mnt From afc81346571eed7b65762c4f9150a520aff9d47d Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 23:05:09 +0300 Subject: [PATCH 094/106] this else could exit and brake install --- archon.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/archon.sh b/archon.sh index 38174bb..8cd9820 100755 --- a/archon.sh +++ b/archon.sh @@ -453,9 +453,6 @@ function chroot_stage { mkswap /swapfile echo '/swapfile none swap defaults 0 0' >> /etc/fstab fi - else - echo -e "${IYellow}Έξοδος...${NC}" - exit 0 fi echo "" echo '--------------------------------------' From d32f34ee3a7ad3a7604b31943a4a7c8f6fd24d79 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 23:10:35 +0300 Subject: [PATCH 095/106] clean up after facter --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index 8cd9820..3593fa1 100755 --- a/archon.sh +++ b/archon.sh @@ -89,7 +89,7 @@ function check_if_in_VM() { else echo -e "${IGreen}Δεν είμαστε σε VM (VirtualBox | VMware) ...${NC}" sleep 2 - pacman -Rs --noconfirm facter + pacman -Rs --noconfirm facter boost-libs cpp-hocon leatherman fi sleep 2 } From 8c47254f84c0ac9f9781310ec6e779f13ea9e09d Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Thu, 4 Jun 2020 23:29:13 +0300 Subject: [PATCH 096/106] fix missing hosts file --- archon.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/archon.sh b/archon.sh index 3593fa1..3184240 100755 --- a/archon.sh +++ b/archon.sh @@ -289,6 +289,11 @@ function chroot_stage { echo read -rp "Δώστε όνομα υπολογιστή (hostname): " hostvar echo "$hostvar" > /etc/hostname + { + echo "127.0.0.1 localhost" + echo "127.0.1.1 $hostvar.localdomain $hostvar" + echo "::1 localhost" + }> /etc/hosts echo sleep 2 echo '-------------------------------------' From 4842f11c95ef1f953282307717ae2c8b63636642 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Sat, 6 Jun 2020 20:05:03 +0300 Subject: [PATCH 097/106] Add security for swapsize variable --- archon.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/archon.sh b/archon.sh index 3184240..2b37837 100755 --- a/archon.sh +++ b/archon.sh @@ -437,6 +437,14 @@ function chroot_stage { if YN_Q "Θέλετε να δημιουργήσετε swapfile (y/n); " "μη έγκυρος χαρακτήρας" ; then echo read -rp "Τι μέγεθος να έχει το swapfile;(Σε MB)" swap_size + while : # Δικλείδα ασφαλείας αν ο χρήστης προσθέσει μεγάλο νούμερο. + do + if [ "$swap_size" -ge 512 ] && [ "$swap_size" -le 8192 ]; then + break + else + read -rp " Δώσε μία τιμή από 512 εως 8192 :" swap_size + fi + done if [[ "$file_format" == "btrfs" ]]; then mount "$diskvar""$diskletter""$disknumber" /mnt btrfs subvolume create /mnt/@swap From 61aea303af6d732e78a3c5a4177b10eea79793cb Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Sat, 6 Jun 2020 21:43:00 +0300 Subject: [PATCH 098/106] Bug fix function installer and replace --- archon.sh | 102 ++++++++++++++++++++---------------------------------- 1 file changed, 37 insertions(+), 65 deletions(-) diff --git a/archon.sh b/archon.sh index 2b37837..a4f15de 100755 --- a/archon.sh +++ b/archon.sh @@ -95,16 +95,17 @@ function check_if_in_VM() { } # Still produces : target not found -#function installer() { -# echo -e "${IGreen}Εγκατάσταση $1 ...${NC}" -# if pacman -S --noconfirm "${@:2}" -# then -# echo -e "${IGreen}[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $1 ...${NC}" -# else -# echo -e "${IRed}[ ΑΠΕΤΥΧΕ ] Εγκατάσταση $1 ...${NC}" -# fi -# -#} +function installer() { + echo -e "${IGreen}Εγκατάσταση $1 " + echo -e "${0IGreen}Θα εγκατασταθούν τα παρακάτω ${@:2} " + if pacman -S --noconfirm "${@:2}" + then + echo -e "${IGreen}[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $1 ...${NC}" + else + echo -e "${IRed}[ ΑΠΕΤΥΧΕ ] Εγκατάσταση $1 ...${NC}" + fi + +} # Check Net Connection | If it is off , exit immediately # function check_net_connection() { @@ -124,8 +125,7 @@ function check_net_connection() { function initialize_desktop_selection() { sleep 2 echo "Εγκατάσταση Xorg Server" - sudo pacman -S --noconfirm xorg xorg-server xorg-xinit alsa-utils alsa-firmware pulseaudio noto-fonts - #installer "Xorg Server" "xorg xorg-server xorg-xinit alsa-utils alsa-firmware pulseaudio noto-fonts" # Εγκατάσταση Xorg Server + installer "Xorg Server" xorg xorg-server xorg-xinit alsa-utils alsa-firmware pulseaudio noto-fonts # Εγκατάσταση Xorg Server PS3='Επιλέξτε ένα από τα διαθέσιμα γραφικά περιβάλλοντα : ' options=("GNOME" "Mate" "Deepin" "Xfce" "KDE" "LXQt" "Cinnamon" "Budgie" "i3" "Enlightenment" "UKUI" "Fluxbox" "Sugar" "Twm" "Έξοδος") @@ -135,85 +135,75 @@ function initialize_desktop_selection() { case "$choice" in "GNOME") echo -e "${IGreen}Εγκατάσταση GNOME Desktop Environment ...\n${NC}" - sudo pacman -S --noconfirm gnome gnome-extra - #installer "GNOME Desktop" "gnome gnome-extra" + installer "GNOME Desktop" gnome gnome-extra sudo systemctl enable gdm sudo systemctl enable NetworkManager exit 0 ;; "Mate") - echo -e "${IGreen}Εγκατάσταση Mate Desktop Environment ... \n${NC}" - sudo pacman -S --noconfirm mate mate-extra lightdm lightdm-gtk-greeter - #installer "Mate Desktop" "mate mate-extra networkmanager network-manager-applet" - #installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" + echo -e "${IGreen}Εγκατάσταση Mate Desktop Environment ... \n${NC}" + installer "Mate Desktop" mate mate-extra networkmanager network-manager-applet + installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" sudo systemctl enable lightdm sudo systemctl enable NetworkManager exit 0 ;; "Deepin") echo -e "${IGreen}Εγκατάσταση Deepin Desktop Environment ...\n${NC}" - sudo pacman -S --noconfirm deepin deepin-extra networkmanager - #installer "Deepin Desktop" "deepin deepin-extra networkmanager" + installer "Deepin Desktop" deepin deepin-extra networkmanager sudo systemctl enable lightdm sudo systemctl enable NetworkManager exit 0 ;; "Xfce") echo -e "${IGreen}Εγκατάσταση Xfce Desktop Environment ... \n${NC}" - sudo pacman -S --noconfirm xfce4 xfce4-goodies pavucontrol networkmanager network-manager-applet lightdm lightdm-gtk-greeter - #installer "Xfce Desktop" "xfce4 xfce4-goodies pavucontrol networkmanager network-manager-applet" - #installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" + installer "Xfce Desktop" xfce4 xfce4-goodies pavucontrol networkmanager network-manager-applet + installer "LightDM Display Manager" lightdm lightdm-gtk-greeter sudo systemctl enable lightdm sudo systemctl enable NetworkManager exit 0 ;; "KDE") echo -e "${IGreen}Εγκατάσταση KDE Desktop Environment ... \n${NC}" - sudo pacman -S --noconfirm plasma-meta konsole dolphin - #installer "KDE Desktop" "plasma-meta konsole dolphin" + installer "KDE Desktop" plasma-meta konsole dolphin sudo systemctl enable sddm sudo systemctl enable NetworkManager exit 0 ;; "LXQt") echo -e "${IGreen}Εγκατάσταση LXQt Desktop Environment ... \n${NC}" - sudo pacman -S --noconfirm lxqt breeze-icons sddm - #installer "LXQt Desktop" "lxqt breeze-icons" - #installer "SDDM Display Manager" "sddm" + installer "LXQt Desktop" lxqt breeze-icons + installer "SDDM Display Manager" sddm sudo systemctl enable sddm sudo systemctl enable NetworkManager exit 0 ;; "Cinnamon") echo -e "${IGreen}Εγκατάσταση Cinnamon Desktop Environment ... \n${NC}" - sudo pacman -S --noconfirm cinnamon xterm networkmanager lightdm lightdm-gtk-greeter - #installer "Cinnamon Desktop" "cinnamon xterm networkmanager" - installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" + installer "Cinnamon Desktop" cinnamon xterm networkmanager + installer "LightDM Display Manager" lightdm lightdm-gtk-greeter sudo systemctl enable lightdm sudo systemctl enable NetworkManager exit 0 ;; "Budgie") echo -e "${IGreen}Εγκατάσταση Budgie Desktop Environment ... \n${NC}" - sudo pacman -S --noconfirm budgie-desktop budgie-extras xterm networkmanager network-manager-applet lightdm lightdm-gtk-greeter - #installer "Budgie Desktop" "budgie-desktop budgie-extras xterm networkmanager network-manager-applet" - #installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" + installer "Budgie Desktop" budgie-desktop budgie-extras xterm networkmanager network-manager-applet + installer "LightDM Display Manager" lightdm lightdm-gtk-greeter sudo systemctl enable lightdm sudo systemctl enable NetworkManager exit 0 ;; "i3") echo -e "${IGreen}Εγκατάσταση i3 Desktop Environment ... \n${NC}" - sudo pacman -S --noconfirm i3 dmenu rxvt-unicode - #installer "i3 Desktop" "i3 dmenu rxvt-unicode" + installer "i3 Desktop" i3 dmenu rxvt-unicode echo -e '#!/bin/bash \nexec i3' > /home/"$USER"/.xinitrc exit 0 ;; "Enlightenment") echo -e "${IGreen}Εγκατάσταση Enlightenment Desktop Environment ... \n${NC}" - sudo pacman -S --noconfirm enlightenment terminology connman acpid lightdm lightdm-gtk-greeter - #installer "Enlightenment Desktop" "enlightenment terminology connman acpid" #acpid and iwd need investigation - #installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" + installer "Enlightenment Desktop" enlightenment terminology connman acpid #acpid and iwd need investigation + installer "LightDM Display Manager" lightdm lightdm-gtk-greeter sudo systemctl enable lightdm sudo systemctl enable acpid sudo systemctl enable connman.service @@ -221,32 +211,28 @@ function initialize_desktop_selection() { ;; "UKUI") echo -e "${IGreen}Εγκατάσταση UKUI Desktop Environment ... \n${NC}" - sudo pacman -S --noconfirm ukui xterm networkmanager network-manager-applet - #installer "UKUI Desktop" "ukui xterm networkmanager network-manager-applet" + installer "UKUI Desktop" ukui xterm networkmanager network-manager-applet sudo systemctl enable lightdm sudo systemctl enable NetworkManager exit 0 ;; "Fluxbox") echo -e "${IGreen}Εγκατάσταση Fluxbox Desktop Environment ... \n${NC}" - sudo pacman -S --noconfirm fluxbox xterm menumaker - #installer "Fluxbox Desktop" "fluxbox xterm menumaker" + installer "Fluxbox Desktop" fluxbox xterm menumaker echo -e '#!/bin/bash \nstartfluxbox' > /home/"$USER"/.xinitrc exit 0 ;; "Sugar") echo -e "${IGreen}Εγκατάσταση Sugar Desktop Environment ... \n${NC}" - sudo pacman -S --noconfirm sugar sugar-fructose xterm lxdm - #installer "Sugar Desktop" "sugar sugar-fructose xterm" - #installer "LXDM Display Manager" "lxdm" + installer "Sugar Desktop" sugar sugar-fructose xterm + installer "LXDM Display Manager" lxdm sudo systemctl enable lxdm sudo systemctl enable NetworkManager exit 0 ;; "Twm") echo -e "${IGreen}Εγκατάσταση Twm Desktop Environment ... \n${NC}" - sudo pacman -S --noconfirm xorg-twm xterm xorg-xclock - #installer "Twm Desktop" "xorg-twm xterm xorg-xclock" + installer "Twm Desktop" xorg-twm xterm xorg-xclock exit 0 ;; "Έξοδος") @@ -350,7 +336,7 @@ function chroot_stage { echo '---------------------------------------' sleep 2 if YN_Q "Θέλετε να εγκαταστήσετε πυρήνα μακράς υποστήριξης (Long Term Support) (y/n); "; then - sudo pacman -S --noconfirm linux-lts + installer "Linux Lts Kernel" linux-lts fi echo echo @@ -362,7 +348,7 @@ function chroot_stage { echo '---------------------------------------' echo sleep 2 - pacman -S --noconfirm grub efibootmgr os-prober + installer "Gurb Bootloader" grub efibootmgr os-prober 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) @@ -388,13 +374,9 @@ function chroot_stage { rm disks.txt if [ -d /sys/firmware/efi ]; then - #pacman -S --noconfirm grub efibootmgr os-prober grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch_grub --recheck grub-mkconfig -o /boot/grub/grub.cfg else - #pacman -S --noconfirm grub os-prober - #lsblk | grep -i sd - #read -rp " Σε ποιο δίσκο θέλετε να εγκατασταθεί ο grub (/dev/sd? | /dev/nvme?); " grubvar diskchooser grub grub-install --target=i386-pc --recheck "$grubvar" grub-mkconfig -o /boot/grub/grub.cfg @@ -658,12 +640,6 @@ echo ' γίνει η εγκατάσταση του Arch Linux ' echo '----------------------------------------------' echo diskchooser -#lsblk | grep -i 'sd\|nvme' #Προσθήκη nvme ανάγνωσης στην εντολή lsblk -#echo -#echo -#echo '--------------------------------------------------------' -#read -rp " Γράψτε σε ποιο δίσκο (με την μορφή /dev/sdX ή /dev/nvmeX) θα εγκατασταθεί το Arch; " diskvar -#echo '--------------------------------------------------------' echo echo '--------------------------------------------------------' echo -e "${IYellow} Η εγκατάσταση θα γίνει στον $diskvar ${NC}" @@ -702,8 +678,7 @@ else echo -e "${IYellow} Χρησιμοποιείς PC με BIOS${NC}"; echo sleep 1 - #Συνάρτηση για BIOS, αν προστεθεί sd? ή nvme? (line 334-348) - ########## Υποστηριξη GPT για BIOS συστήματα ########## + ########## Υποστηριξη GPT για BIOS συστήματα ########## echo -e "${IYellow}Θα θέλατε GPT Partition scheme ή MBR${NC}" echo PS3="Επιλογή partition scheme: " @@ -739,9 +714,6 @@ echo '--------------------------------------------------------' echo -e "${IGreen} 4 - Ανανέωση πηγών λογισμικού (Mirrors)${NC} " echo '--------------------------------------------------------' pacman -Syy -#pacman -S --noconfirm reflector #απενεργοποίηση λόγω bug του Reflector -#reflector --latest 10 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist -#pacman -Syy sleep 1 echo echo From be5209089570e2167fb91a73f8be849459c7cdae Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Sat, 6 Jun 2020 22:50:45 +0300 Subject: [PATCH 099/106] Fixes to function installer --- archon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archon.sh b/archon.sh index a4f15de..a1ea02e 100755 --- a/archon.sh +++ b/archon.sh @@ -96,8 +96,8 @@ function check_if_in_VM() { # Still produces : target not found function installer() { - echo -e "${IGreen}Εγκατάσταση $1 " - echo -e "${0IGreen}Θα εγκατασταθούν τα παρακάτω ${@:2} " + echo -e "${IGreen}Εγκατάσταση $1 ...${NC}" + echo -e "${IGreen}Θα εγκατασταθούν τα παρακάτω ${@:2} ${NC}" if pacman -S --noconfirm "${@:2}" then echo -e "${IGreen}[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $1 ...${NC}" From 6c1e7854d94ead617e1576a6cdc3432b6d02e65a Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Sat, 6 Jun 2020 23:20:48 +0300 Subject: [PATCH 100/106] Repacle pacman -S with installer function and bug fixes --- archon.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/archon.sh b/archon.sh index a1ea02e..fd77e36 100755 --- a/archon.sh +++ b/archon.sh @@ -81,11 +81,11 @@ function filesystems(){ function check_if_in_VM() { echo -e "${IGreen}Έλεγχος περιβάλλοντος (PC | VM) ...${NC}" sleep 2 - pacman -S --noconfirm facter + installer "Πακέτα Ελέγχου" facter if [[ $(facter 2>/dev/null | grep 'is_virtual' | awk -F'=> ' '{print $2}') == true ]]; then echo -e "${IGreen}Είμαστε σε VM (VirtualBox | VMware) ...${NC}" sleep 2 - pacman -S --noconfirm virtualbox-guest-dkms linux-headers xf86-video-vmware + installer "Πακέτα για VM" virtualbox-guest-dkms linux-headers xf86-video-vmware else echo -e "${IGreen}Δεν είμαστε σε VM (VirtualBox | VMware) ...${NC}" sleep 2 @@ -97,8 +97,8 @@ function check_if_in_VM() { # Still produces : target not found function installer() { echo -e "${IGreen}Εγκατάσταση $1 ...${NC}" - echo -e "${IGreen}Θα εγκατασταθούν τα παρακάτω ${@:2} ${NC}" - if pacman -S --noconfirm "${@:2}" + echo -e "${IGreen}Θα εγκατασταθούν τα παρακάτω ${*:2} ${NC}" + if pacman -S --noconfirm "${*:2}" then echo -e "${IGreen}[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $1 ...${NC}" else @@ -302,7 +302,7 @@ function chroot_stage { if [ "$wifi" = "" ]; then # Έλεγχος αν υπάρχει κάρτα wifi echo -e "${IYellow}Δε βρέθηκε ασύρματη κάρτα δικτύου${NC}" # και αν υπάρχει γίνεται εγκατάσταση else # και ενεργοποίηση - pacman -S --noconfirm iw wpa_supplicant dialog netctl wireless-regdb crda # CRDA/wireless-regdb : https://wiki.archlinux.org/index.php/Network_configuration/Wireless#Respecting_the_regulatory_domain + installer "Ρυθμίσεις Ασύρματης Κάρτας" iw wpa_supplicant dialog netctl wireless-regdb crda # CRDA/wireless-regdb : https://wiki.archlinux.org/index.php/Network_configuration/Wireless#Respecting_the_regulatory_domain systemctl enable netctl-auto@"$wifi".service echo -e "${IGreen}Η ασύρματη κάρτα δικτύου $wifi ρυθμίστηκε επιτυχώς${NC}" fi From ba084a88aa8e078ac2fc67a43210522e4fc2d746 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Sat, 6 Jun 2020 23:57:48 +0300 Subject: [PATCH 101/106] Fix function installer bug --- archon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archon.sh b/archon.sh index fd77e36..2275e4c 100755 --- a/archon.sh +++ b/archon.sh @@ -97,8 +97,8 @@ function check_if_in_VM() { # Still produces : target not found function installer() { echo -e "${IGreen}Εγκατάσταση $1 ...${NC}" - echo -e "${IGreen}Θα εγκατασταθούν τα παρακάτω ${*:2} ${NC}" - if pacman -S --noconfirm "${*:2}" + echo -e "${IGreen}Θα εγκατασταθούν τα παρακάτω ${*:2} ${NC}" # Ενημέρωση του τι θα εγκατασταθεί + if pacman -S --noconfirm "${@:2}" # Με ${*2} διαβάζει τα input then echo -e "${IGreen}[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $1 ...${NC}" else From db85ac2b1d71e0c4a1f302428368e849d30c24b8 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Sun, 7 Jun 2020 00:14:05 +0300 Subject: [PATCH 102/106] Remove string --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index 2275e4c..ae4ea6d 100755 --- a/archon.sh +++ b/archon.sh @@ -143,7 +143,7 @@ function initialize_desktop_selection() { "Mate") echo -e "${IGreen}Εγκατάσταση Mate Desktop Environment ... \n${NC}" installer "Mate Desktop" mate mate-extra networkmanager network-manager-applet - installer "LightDM Display Manager" "lightdm lightdm-gtk-greeter" + installer "LightDM Display Manager" lightdm lightdm-gtk-greeter sudo systemctl enable lightdm sudo systemctl enable NetworkManager exit 0 From 7a601f2edaee2cad34290380ba97e2f58a9375b8 Mon Sep 17 00:00:00 2001 From: JohnGavr Date: Sun, 7 Jun 2020 00:24:10 +0300 Subject: [PATCH 103/106] Yellow color packages install --- archon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archon.sh b/archon.sh index ae4ea6d..b285c91 100755 --- a/archon.sh +++ b/archon.sh @@ -97,7 +97,7 @@ function check_if_in_VM() { # Still produces : target not found function installer() { echo -e "${IGreen}Εγκατάσταση $1 ...${NC}" - echo -e "${IGreen}Θα εγκατασταθούν τα παρακάτω ${*:2} ${NC}" # Ενημέρωση του τι θα εγκατασταθεί + echo -e "${IYellow}Θα εγκατασταθούν τα παρακάτω ${*:2} ${NC}" # Ενημέρωση του τι θα εγκατασταθεί if pacman -S --noconfirm "${@:2}" # Με ${*2} διαβάζει τα input then echo -e "${IGreen}[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $1 ...${NC}" From 981d2b60f354e544aa3d8ab40795e49a37b18562 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sun, 7 Jun 2020 16:56:33 +0300 Subject: [PATCH 104/106] rm experimental from Btrfs, some echo's and clean up --- archon.sh | 147 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 85 insertions(+), 62 deletions(-) diff --git a/archon.sh b/archon.sh index b285c91..14b57bc 100755 --- a/archon.sh +++ b/archon.sh @@ -26,7 +26,7 @@ NC='\033[0m' ########Filesystem Function################## function filesystems(){ PS3="Επιλέξτε filesystem: " - options=("ext4" "XFS (experimental)" "Btrfs (experimental)" "F2FS (experimental)") + options=("ext4" "XFS (experimental)" "Btrfs" "F2FS (experimental)") select opt in "${options[@]}" do case $opt in # Η diskletter παίρνει τιμή μόνο αν είναι nvme ο δίσκος @@ -38,17 +38,18 @@ function filesystems(){ break ;; "XFS (experimental)") - fsprogs="xfsprogs" + fsprogs="xfsprogs" mkfs.xfs "$diskvar""$diskletter""$disknumber" mount "$diskvar""$diskletter""$disknumber" "/mnt" file_format="xfs" break ;; - "Btrfs (experimental)") + "Btrfs") fsprogs="btrfs-progs" mkfs.btrfs "-f" "$diskvar""$diskletter""$disknumber" mount "$diskvar""$diskletter""$disknumber" "/mnt" btrfs subvolume create /mnt/@ + echo if YN_Q "Θέλετε να προστεθεί subvolume home (y/n); " "μη έγκυρος χαρακτήρας" ; then btrfs subvolume create /mnt/@home umount /mnt @@ -79,29 +80,36 @@ function filesystems(){ ######## Functions for Desktop and X Dsiplay server (X-Org)#### # function check_if_in_VM() { + echo echo -e "${IGreen}Έλεγχος περιβάλλοντος (PC | VM) ...${NC}" sleep 2 - installer "Πακέτα Ελέγχου" facter + installer "Εγκατάσταση εργαλείου Ελέγχου : " facter if [[ $(facter 2>/dev/null | grep 'is_virtual' | awk -F'=> ' '{print $2}') == true ]]; then + echo echo -e "${IGreen}Είμαστε σε VM (VirtualBox | VMware) ...${NC}" sleep 2 installer "Πακέτα για VM" virtualbox-guest-dkms linux-headers xf86-video-vmware else - echo -e "${IGreen}Δεν είμαστε σε VM (VirtualBox | VMware) ...${NC}" + echo + echo -e "${IGreen}Δεν είμαστε σε VM (VirtualBox | VMware) αφαίρεση εργαλείων ελέγχου...${NC}" sleep 2 - pacman -Rs --noconfirm facter boost-libs cpp-hocon leatherman + pacman -Rs --noconfirm facter boost-libs cpp-hocon leatherman yaml-cpp fi sleep 2 } -# Still produces : target not found + function installer() { echo -e "${IGreen}Εγκατάσταση $1 ...${NC}" - echo -e "${IYellow}Θα εγκατασταθούν τα παρακάτω ${*:2} ${NC}" # Ενημέρωση του τι θα εγκατασταθεί + echo + echo -e "${IYellow}Θα εγκατασταθούν τα : ${*:2} ${NC}" # Ενημέρωση του τι θα εγκατασταθεί + echo if pacman -S --noconfirm "${@:2}" # Με ${*2} διαβάζει τα input then + echo echo -e "${IGreen}[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $1 ...${NC}" else + echo echo -e "${IRed}[ ΑΠΕΤΥΧΕ ] Εγκατάσταση $1 ...${NC}" fi @@ -114,18 +122,24 @@ function check_net_connection() { echo -e "${IGreen}Έλεγχος σύνδεσης στο διαδίκτυο${NC}" echo '----------------------------------------' if ping -c 3 www.google.com &> /dev/null; then + echo echo -e "${IYellow}Η σύνδεση στο διαδίκτυο φαίνεται ενεργοποιημένη...Προχωράμε...\n${NC}" else + echo echo -e "${IRed} Η σύνδεση στο Διαδίκτυο φαίνεται απενεργοποιημένη ... Ματαίωση ...\n" echo -e "Συνδεθείτε στο Διαδίκτυο και δοκιμάστε ξανά ... \n Ματαίωση...${NC}" + echo exit 1 fi } function initialize_desktop_selection() { sleep 2 + echo echo "Εγκατάσταση Xorg Server" - installer "Xorg Server" xorg xorg-server xorg-xinit alsa-utils alsa-firmware pulseaudio noto-fonts # Εγκατάσταση Xorg Server + echo + installer "Xorg Server" xorg xorg-server xorg-xinit alsa-utils alsa-firmware pulseaudio pulseaudio-alsa noto-fonts # Εγκατάσταση Xorg Server και Audio server + echo PS3='Επιλέξτε ένα από τα διαθέσιμα γραφικά περιβάλλοντα : ' options=("GNOME" "Mate" "Deepin" "Xfce" "KDE" "LXQt" "Cinnamon" "Budgie" "i3" "Enlightenment" "UKUI" "Fluxbox" "Sugar" "Twm" "Έξοδος") @@ -281,7 +295,6 @@ function chroot_stage { echo "::1 localhost" }> /etc/hosts echo - sleep 2 echo '-------------------------------------' echo -e "${IGreen}9 - Ρύθμιση της κάρτας δικτύου${NC}" echo ' ' @@ -292,19 +305,22 @@ function chroot_stage { sleep 2 ethernet=$(ip link | grep "2: "| grep -oE "(en\\w+)") # Αναζήτηση κάρτας ethernet if [ "$ethernet" = "" ]; then # Έλεγχος αν υπάρχει κάρτα ethernet - echo -e "${IYellow}Δε βρέθηκε ενσύρματη κάρτα δικτύου${NC}" # και αν υπάρχει γίνεται εγκατάσταση + echo + echo -e "${IYellow}Δε βρέθηκε ενσύρματη κάρτα δικτύου${NC}" # και αν υπάρχει γίνεται εγκατάσταση else # και ενεργοποίηση - systemctl enable dhcpcd@"$ethernet".service - echo -e "${IGreen}Η κάρτα δικτύου $ethernet ρυθμίστηκε επιτυχώς${NC}"; + systemctl enable dhcpcd@"$ethernet".service + echo + echo -e "${IGreen}Η κάρτα δικτύου $ethernet ρυθμίστηκε επιτυχώς${NC}"; fi - echo wifi=$(ip link | grep ": "| grep -oE "(w\\w+)") # Αναζήτηση κάρτας wifi if [ "$wifi" = "" ]; then # Έλεγχος αν υπάρχει κάρτα wifi - echo -e "${IYellow}Δε βρέθηκε ασύρματη κάρτα δικτύου${NC}" # και αν υπάρχει γίνεται εγκατάσταση + echo + echo -e "${IYellow}Δε βρέθηκε ασύρματη κάρτα δικτύου${NC}" # και αν υπάρχει γίνεται εγκατάσταση else # και ενεργοποίηση installer "Ρυθμίσεις Ασύρματης Κάρτας" iw wpa_supplicant dialog netctl wireless-regdb crda # CRDA/wireless-regdb : https://wiki.archlinux.org/index.php/Network_configuration/Wireless#Respecting_the_regulatory_domain systemctl enable netctl-auto@"$wifi".service - echo -e "${IGreen}Η ασύρματη κάρτα δικτύου $wifi ρυθμίστηκε επιτυχώς${NC}" + echo + echo -e "${IGreen}Η ασύρματη κάρτα δικτύου $wifi ρυθμίστηκε επιτυχώς${NC}" fi sleep 2 echo @@ -315,17 +331,14 @@ function chroot_stage { echo 'του root χρήστη ' echo '-------------------------------------' echo - sleep 1 ######################################################### until passwd # Μέχρι να είναι επιτυχής do # η αλλαγή του κωδικού - echo # του root χρήστη, θα - echo -e "${IYellow}O root κωδικός δεν άλλαξε, δοκιμάστε ξανά!${NC}" # τυπώνεται αυτό το μήνυμα - echo # + echo # του root χρήστη, θα + echo -e "${IYellow}O root κωδικός δεν άλλαξε, δοκιμάστε ξανά!${NC}" # τυπώνεται αυτό το μήνυμα + echo # done # ######################################################### - sleep 2 - echo echo echo '---------------------------------------' echo -e "${IGreen}11 - Linux LTS kernel (προαιρετικό)${NC}" @@ -339,7 +352,6 @@ function chroot_stage { installer "Linux Lts Kernel" linux-lts fi echo - echo echo '---------------------------------------' echo -e "${IGreen}12 - Ρύθμιση GRUB${NC} " echo ' ' @@ -364,11 +376,10 @@ function chroot_stage { mkdir /run/media/disk$num mount "$line" /run/media/disk$num && echo -e "${IYellow}Προσαρτάται ο... $num oς δίσκος${NC}" sleep 1 - - done < "disks.txt" + done < "disks.txt" else - echo -e "${IYellow}Δεν υπάρχουν άλλοι δίσκοι στο σύστημα${NC}" + echo -e "${IYellow}Δεν υπάρχουν άλλοι δίσκοι στο σύστημα${NC}" fi sleep 5 rm disks.txt @@ -399,13 +410,12 @@ function chroot_stage { ######################################################### until passwd "$onomaxristi" # Μέχρι να είναι επιτυχής do # η εντολή - echo -e "${IYellow}O κωδικός του χρήστη δεν άλλαξε, δοκιμάστε ξανά!${NC}" # τυπώνεται αυτό το μήνυμα - echo + echo -e "${IYellow}O κωδικός του χρήστη δεν άλλαξε, δοκιμάστε ξανά!${NC}" # τυπώνεται αυτό το μήνυμα + echo done ######################################################### echo "$onomaxristi ALL=(ALL) ALL" >> /etc/sudoers echo - echo echo '--------------------------------------' echo -e "${IGreen}14 - Προσθήκη SWAP file${NC} " echo ' ' @@ -418,13 +428,14 @@ function chroot_stage { echo if YN_Q "Θέλετε να δημιουργήσετε swapfile (y/n); " "μη έγκυρος χαρακτήρας" ; then echo - read -rp "Τι μέγεθος να έχει το swapfile;(Σε MB)" swap_size - while : # Δικλείδα ασφαλείας αν ο χρήστης προσθέσει μεγάλο νούμερο. + read -rp "Τι μέγεθος να έχει το swapfile; (Σε MB) : " swap_size + echo + while : # Δικλείδα ασφαλείας αν ο χρήστης προσθέσει μεγάλο νούμερο. do if [ "$swap_size" -ge 512 ] && [ "$swap_size" -le 8192 ]; then break else - read -rp " Δώσε μία τιμή από 512 εως 8192 :" swap_size + read -rp "Δώσε μία τιμή από 512 εως 8192 : " swap_size fi done if [[ "$file_format" == "btrfs" ]]; then @@ -449,14 +460,14 @@ function chroot_stage { echo '/swapfile none swap defaults 0 0' >> /etc/fstab fi fi - echo "" + echo echo '--------------------------------------' echo -e "${IGreen}BONUS - Εγκατάσταση Desktop${NC}" echo ' ' echo 'Θέλετε να εγκαταστήσετε κάποιο γραφικό' echo 'περιβάλλον ; ' echo ' ' - echo -e " ${IGreen}ΣΗΜΑΝΤΙΚΟ:${NC} " + echo -e " ${IGreen}ΣΗΜΑΝΤΙΚΟ:${NC} " echo 'Τα διαθέσιμα γραφικά περιβάλλοντα ' echo 'είναι ΜΟΝΟ από τα επίσημα αποθετήρια ' echo 'και όχι από το AUR. Όποιο και αν ' @@ -465,15 +476,22 @@ function chroot_stage { echo 'επίσημες KISS οδηγίες του Arch Wiki ' echo '--------------------------------------' sleep 2 + echo ############# Installing Desktop ########### if YN_Q "Θέλετε να συνεχίσετε (y/n); " "μη έγκυρος χαρακτήρας" ; then - echo "" + echo echo -e "${IYellow}Έναρξη της εγκατάστασης${NC}" check_if_in_VM initialize_desktop_selection else - echo -e "${IYellow}Έξοδος...${NC}" - exit 0 + echo '--------------------------------------------------------' + echo -e "${IGreen} Τέλος εγκατάστασης${NC} " + echo ' Μπορείτε να επανεκκινήσετε το σύστημά σας και να κάνετε ' + echo ' εγκατάσταση τις εφαρμογές ή το γραφικό περιβάλλον που' + echo ' θέλετε...' + echo '--------------------------------------------------------' + sleep 5 + exit fi } @@ -528,27 +546,29 @@ while IFS='' read -r line || [[ -n "$line" ]]; do echo "[$num]" "$line" done < disks echo "---------------------------------------------------------" +echo read -rp "Επιλέξτε δίσκο για εγκατάσταση (Q/q για έξοδο): " input if [[ $input = "q" ]] || [[ $input = "Q" ]] then - echo -e "${IYellow}Έξοδος...${NC}" - tput cnorm -- normal # Εμφάνιση cursor + echo + echo -e "${IYellow}Έξοδος...${NC}" + tput cnorm -- normal # Εμφάνιση cursor exit 0 fi if [ "$input" -gt 0 ] && [ "$input" -le $num ]; #έλεγχος αν το input είναι μέσα στο εύρος της λίστας then if [[ $1 = "grub" ]]; # αν προστεθεί το όρισμα grub τότε η μεταβλητή που θα αποθηκευτεί - then # θα είναι η grubvar - grubvar="/dev/"$(cat < disks | head -n$(( input )) | tail -n1 ) - echo Διάλεξατε τον "$grubvar" + then # θα είναι η grubvar + grubvar="/dev/"$(cat < disks | head -n$(( input )) | tail -n1 ) + echo Διάλεξατε τον "$grubvar" else - diskvar="/dev/"$(cat < disks | head -n$(( input )) | tail -n1 ) + diskvar="/dev/"$(cat < disks | head -n$(( input )) | tail -n1 ) if [[ "$diskvar" = *"/dev/nvme0n"[1-9]* ]]; then #Εκχώρηση τιμής στην diskletter αν είναι nvme ο δίσκος. diskletter="p" fi - echo Διάλεξατε τον "$diskvar" + echo Διάλεξατε τον "$diskvar" fi break else @@ -565,20 +585,23 @@ export -f diskchooser #Τυπικός έλεγχος για το αν είσαι root. because you never know if [ "$(id -u)" -ne 0 ] ; then - echo -e "${IRed}Λυπάμαι, αλλά πρέπει να είσαι root χρήστης για να τρέξεις το Archon.${NC}" + echo + echo -e "${IRed}Λυπάμαι, αλλά πρέπει να είσαι root χρήστης για να τρέξεις το Archon.${NC}" echo -e "${IYellow}Έξοδος...${NC}" - sleep 2 + echo + sleep 2 exit 1 fi #Τυπικός έλεγχος για το αν το τρέχει σε Arch. if [ ! -f /etc/arch-release ] ; then - echo -e "${IRed}Λυπάμαι, αλλά το σύστημα στο οποίο τρέχεις το Archon δεν είναι Arch Linux${NC}" + echo + echo -e "${IRed}Λυπάμαι, αλλά το σύστημα στο οποίο τρέχεις το Archon δεν είναι Arch Linux${NC}" echo -e "${IYellow}Έξοδος...${NC}" - sleep 2 + echo + sleep 2 exit fi - setfont gr928a-8x16.psfu echo -e "----------------------${IGreen} Archon ${NC}--------------------------" echo " _____ "; @@ -606,9 +629,10 @@ echo ' You have been warned !!!' sleep 5 echo if YN_Q "Θέλετε να συνεχίσετε (y/n); " "μη έγκυρος χαρακτήρας" ; then - echo "" + echo echo -e "${IYellow}Έναρξη της εγκατάστασης${NC}" else + echo echo -e "${IYellow} Έξοδος...${NC}" exit 0 fi @@ -618,15 +642,18 @@ echo '---------------------------------------' echo -e "${IGreen} 1 - Έλεγχος σύνδεσης στο διαδίκτυο${NC}" echo '---------------------------------------' if ping -c 3 www.google.com &> /dev/null; then - echo '---------------------------------------' + echo echo -e "${IYellow}Υπάρχει σύνδεση στο διαδίκτυο${NC}" echo ' Η εγκατάσταση θα συνεχιστεί' - echo '---------------------------------------' + echo else + echo echo -e "${IRed}Δεν βρέθηκε σύνδεση στο διαδίκτυο! Συνδεθείτε στο διαδίκτυο και δοκιμάστε ξανά${NC}" - sleep 1 + echo + sleep 1 echo -e "${IYellow} Έξοδος...${NC}" - sleep 1 + echo + sleep 1 exit 1 fi sleep 1 @@ -646,7 +673,6 @@ echo -e "${IYellow} Η εγκατάσταση θα γίνει στον $diskvar echo '--------------------------------------------------------' sleep 1 echo -echo echo '---------------------------------------------' echo -e "${IGreen} 3 - Γίνεται έλεγχος αν το σύστημά σας είναι${NC}" echo ' ' @@ -679,7 +705,8 @@ else echo sleep 1 ########## Υποστηριξη GPT για BIOS συστήματα ########## - echo -e "${IYellow}Θα θέλατε GPT Partition scheme ή MBR${NC}" + echo + echo -e "${IYellow}Θα θέλατε GPT Partition scheme ή MBR${NC}" echo PS3="Επιλογή partition scheme: " options=("MBR" "GPT") @@ -709,13 +736,11 @@ fi sleep 1 echo -echo echo '--------------------------------------------------------' echo -e "${IGreen} 4 - Ανανέωση πηγών λογισμικού (Mirrors)${NC} " echo '--------------------------------------------------------' -pacman -Syy sleep 1 -echo +pacman -Syy echo echo '--------------------------------------------------------' echo -e "${IGreen} 5 - Εγκατάσταση της Βάσης του Arch Linux${NC} " @@ -725,7 +750,6 @@ echo '--------------------------------------------------------' sleep 2 pacstrap /mnt base base-devel linux linux-firmware dhcpcd "$fsprogs" echo -echo echo '--------------------------------------------------------' echo -e "${IGreen} 6 - Ολοκληρώθηκε η βασική εγκατάσταση του Arch Linux${NC}" echo ' ' @@ -744,10 +768,9 @@ genfstab -U /mnt >> /mnt/etc/fstab arch-chroot /mnt ./archon.sh --stage chroot rm /mnt/archon.sh #διαγραφή του script από το / του συστήματος echo -echo echo '--------------------------------------------------------' echo -e "${IGreen} Τέλος εγκατάστασης${NC} " echo ' Μπορείτε να επανεκκινήσετε το σύστημά σας ' echo '--------------------------------------------------------' sleep 5 -exit \ No newline at end of file +exit From a3d67808da97c1c434f8025401d5101325ac5fb0 Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sun, 7 Jun 2020 17:20:11 +0300 Subject: [PATCH 105/106] update for 5.0 --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index d6a4637..7f6c4b0 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,7 @@ * Ο Άρχων εγκαθιστά το βασικό σύστημα Arch Linux χωρίς την προσθήκη γραφικού περιβάλλοντος * Αναγνωρίζει αν το PC όπου γίνεται η εγκατάσταση έχει BIOS ή UEFI και κάνει τις ανάλογες κατατμήσεις (partitions) -* Δημιουργεί ένα μόνο partition (root+home) και για swap χρησιμοποιεί το [systemD-swap](http://cerebrux.net/2017/06/20/systemd-swap-%ce%b3%ce%b9%ce%b1-%cf%8c%cf%83%ce%bf%cf%85%cf%82-%ce%b4%ce%b5%ce%bd-%ce%b8%ce%ad%ce%bb%ce%bf%cf%85%ce%bd-swap-partition/) -* Εγκαθιστά τις multilib βιβλιοθήκες για υποστήριξη 32bit εφαρμογών +* Σε ρωτάει για το σύστημα αρχείων και αν θέλεις swapfile για χρήση ως SWAP * Λίγο πριν τελειώσει, ρωτάει τον χρήστη αν θέλει να επιλέξει και ένα γραφικό περιβάλλον που θέλει να εγκατασταθεί στο σύστημά του. Αν το αποδεχτεί θα κάνει τις απαραίτητες ενέργειες για να έχει την Vanilla - Upstream έκδοση του γραφικού περιβάλλοντος που επέλεξε. ## Σε ποιους απευθύνεται; From ff05789003901a6d65aceddeb8bbb44c4941bd7f Mon Sep 17 00:00:00 2001 From: Salih Emin Date: Sun, 7 Jun 2020 21:46:30 +0300 Subject: [PATCH 106/106] pushed for later release --- postinstall/post_programs_installer.sh | 196 ------------------------- 1 file changed, 196 deletions(-) delete mode 100644 postinstall/post_programs_installer.sh diff --git a/postinstall/post_programs_installer.sh b/postinstall/post_programs_installer.sh deleted file mode 100644 index 0b50d4d..0000000 --- a/postinstall/post_programs_installer.sh +++ /dev/null @@ -1,196 +0,0 @@ -#!/bin/bash -# -# -# Archon -- Ελληνικός Arch Linux Installer -# Copyright (c)2017 Vasilis Niakas, Salih Emin and Contributors -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation version 3 of the License. -# -# Please read the file LICENSE, README and AUTHORS for more information. - - -# Exit codes για success || failure -# -# setfont gr928a-8x16.psfu -OK=0 -NOT_OK=1 - -# A few colors -# -IRed='\033[0;91m' # Red -#IGreen='\033[0;92m' # Green -IYellow='\033[0;93m' # Yellow -ICyan='\033[0;96m' # Not used yet Cyan -IBlue='\033[0;94m' # Blue -NC='\033[0m' # No Color - -# Check Net Connection | If it is off , exit immediately -# -function check_net_connection() { - sleep 1 - echo '---------------------------------------' - echo ' Έλεγχος σύνδεσης στο διαδίκτυο ' - echo '---------------------------------------' - if ping -c 3 www.google.com &> /dev/null; then - echo -e "${IYellow} Η σύνδεση στο διαδίκτυο φαίνεται ενεργοποιημένη...Προχωράμε...\n${NC}" - else - echo -e "${IRed} Η σύνδεση στο Διαδίκτυο φαίνεται απενεργοποιημένη ... Ματαίωση ...\n" - echo -e "Συνδεθείτε στο Διαδίκτυο και δοκιμάστε ξανά ... \n Ματαίωση...${NC}" - exit $NOT_OK - fi -} - -# -# Template install function for installing one of two options of two programs | for now at least -# -function install() { - # Program to install : audacious -> 1st arg | clementine -> 2nd arg | Explanation -> 3rd argument - # - prog_une=$1 - prog_deux=$2 - comment="$3 $4" - - PS3="Γράψτε την επιλογή σας [1 -> $prog_une, 2 -> $prog_deux ή 3 -> exit] >>> " - options=("$prog_une" "$prog_deux" "exit") - - select choice in "${options[@]}" - do - - case "$choice" in - "$prog_une") - echo -e "${IBlue} \nΕγκατάσταση $1 $3 ... ${NC}\n" - if pacman -S --noconfirm "$prog_une" - then - # Sweet, installed program - echo -e "${IYellow} \n[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $prog_une $comment ... ${NC}\n" - return $OK - else - # Oops, failure during program installation - echo -e "${IRed} \n[ ΑΠΟΤΥΧΙΑ ] Εγκατάσταση $prog_une $comment ... ${NC}\n" - return $NOT_OK - fi - ;; - "$prog_deux") - echo -e "${IBlue} \nΕγκατάσταση Audacious Music Player ... ${NC}\n" - if pacman -S --noconfirm "$prog_deux" - then - # Sweet, installed - echo -e "${IYellow} \n[ ΕΠΙΤΥΧΗΣ ] Εγκατάσταση $prog_deux $comment ...${NC}\n" - return $OK - else - # Oops, failure during program installation - echo -e "${IRed} \n[ ΑΠΟΤΥΧΙΑ ] Εγκατάσταση $prog_deux $comment ...${NC}\n" - return $NOT_OK - fi - ;; - "exit") - echo -e "${ICyan}\n Έξοδος όπως επιλέχθηκε από τον χρήστη: '${USER}' ...\n${NC}" - return $OK - ;; - *) - echo -e "${ICyan}\nΟι επιλογές σας πρέπει να είναι [1 ή 2 ή 3]. Μη έγκυρη επιλογή! \n\n${NC}" - sleep 1 - ;; - esac - - done - - return $OK -} - - -# Helping function in order to continue main procedure or not -# -function continue_or_not_check() { - echo -e "Θα θέλατε να συνεχίσετε με την εγκατάσταση προγράμματος $1 ?\n" - - PS3="Γράψτε την επιλογή σας [1 -> Yes | 2 -> No] >>> " - options=("yes" "no") - - select continue_or_not in "${options[@]}" - do - case "$continue_or_not" in - "yes") - echo -e "${ICyan}Προχωράμε με την εγκατάσταση $1 ... ${NC}\n" - break - ;; - "no") - echo -e "${IRed}Έξοδος μετά από επιλογή του υπερ-χρήστη '$USER' ...${NC}\n" - exit $OK - ;; - *) - echo -e "${ICyan}Invalid option detected ...\n${NC}" - ;; - esac - done -} - - -function main() { - # If user is not the super-user, then abort - # - if [ $UID -ne $OK ] - then - echo -e "${IRed} Γίνετε root μέσω του 'sudo -s' | 'sudo -i' | 'su' εντολών και δοκιμάστε ξανά ... ${NC}" - exit $NOT_OK - else - check_net_connection - echo -e "${ICyan} Ξεκινάμε με την εγκατάσταση ενός Music Player ...${NC}\n" - # 1st: Install a Music Player - # - install "clementine" "audacious" "Music Player" - # - # Perform a check : User wishes to continue OR NOT ?? - # - continue_or_not_check "Πολυμέσων (Media Player) " - # 2nd: Install A Media Player - # - install "vlc" "mpv" "Media Player" - # - # Perform a check : User wishes to continue OR NOT ?? - # - continue_or_not_check "περιήγησης στο Διαδίκτυο (Internet Explorer) " - # 3rd : Install a Web Browser - # - install "firefox" "chromium" "Web Broswer" - # - # Perform a check : User wishes to continue OR NOT ?? - # - continue_or_not_check "διαχείρησης Ηλεκτρονικού ταχυδρομίου (Email Client) " - # 4th : Install an Email Client - # - install "thunderbird" "evolution" "Email Client" - # - # Perform a check : User wishes to continue OR NOT ?? - # - continue_or_not_check " Επεξεργασίας κειμένου (Text Editor) " - # 5th : Install a Text/Code Editor - # - install "code" "atom" "Text/Code Editor" - # - # Perform a check : User wishes to continue OR NOT ?? - # - continue_or_not_check " Εξυπηρετητή Torrent (BitTorrent Client) " - # 6th : Install a Bit Torrent Client - # - install "transmission-gtk" "deluge" # "ktorrent" "rtorrent" ?? - - fi -} - - -############# -### MAIN ### -########### - -# Start main function -# -main - -echo -e " $IBlue '$(basename "$0")' Ολοκληρώθηκε με επιτυχία ... $NC \n" - -# TODO: Add logging of all actions maybe ??? -# -