-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsystem_install_2nd_stage.sh
75 lines (56 loc) · 1.78 KB
/
system_install_2nd_stage.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
# This second stage still be run directly on the new system
set -uo pipefail # exit on any failure
trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR
#EMAIL=$(dialog --stdout --inputbox "Enter email" 0 0) || exit 1
#clear
#: ${EMAIL:?"email cannot be empty"}
#GITHUB_USERNAME=$(dialog --stdout --inputbox "Github username" 0 0) || exit 1
#clear
#: ${GITHUB_USERNAME:?"email cannot be empty"}
#GITHUB_KEY_NAME=$(dialog --stdout --inputbox "Github key name for this machine" 0 0) || exit 1
#clear
#: ${GITHUB_KEY_NAME:?"email cannot be empty"}
#EMAIL="[email protected]"
#GITHUB_USERNAME="dbadrian"
#GITHUB_KEY_NAME="laptop"
############## DO NOT MODIFY BELOW THIS LINE ###########
# This does not resolve from a symlink location
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
########################################################
##################### Function Def #####################
########################################################
yes_or_no_run() {
echo -e ${1}
select yn in "Yes" "No"; do
case $yn in
Yes ) ${@:2}; break;;
No ) break;;
esac
done
}
create_ssh_key() {
ssh-keygen -t rsa -b 4096 -C "${1}"
}
########################################################
##################### Main Routine #####################
########################################################
MAKEFLAGS="-j$(nproc)"
#echo "Installing SSH"
#pacman -Syu --noconfirm openssh
#echo "Enabling SSH"
#systemctl enable sshd
cd /tmp
echo "Installing yay"
sudo pacman -S --noconfirm go
git clone https://aur.archlinux.org/yay.git
cd yay
chown -R $user:$user
makepkg -si
# Install s
yay -Y --gendb
yay -Syu --devel
echo ">>>>>>>> Base System Installed <<<<<<<<"