forked from AnarchyLinux/installer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
arch-installer.sh
executable file
·90 lines (75 loc) · 2.08 KB
/
arch-installer.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/bash
###############################################################
### Arch Linux Anywhere Install Script
###
### Copyright (C) 2017 Dylan Schacht
###
### By: Dylan Schacht (deadhead)
### Email: [email protected]
### Webpage: http://arch-anywhere.org
###
### Any questions, comments, or bug reports may be sent to above
### email address. Enjoy, and keep on using Arch.
###
### License: GPL v2.0
###
### 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; either version 2
### of the License, or (at your option) any later version.
###
### This program is distributed in the hope that it will be useful,
### but WITHOUT ANY WARRANTY; without even the implied warranty of
### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
### GNU General Public License for more details.
###
### You should have received a copy of the GNU General Public License
### along with this program; if not, write to the Free Software
### Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
################################################################
init() {
if [ $(basename "$0") = "arch-anywhere" ]; then
aa_dir="/usr/share/arch-anywhere" # Arch Anywhere iso
aa_conf="/etc/arch-anywhere.conf"
aa_lib="/usr/lib/arch-anywhere"
else
aa_dir=$(dirname $(readlink -f "$0")) # Arch Anywhere git repository
aa_conf="$aa_dir"/etc/arch-anywhere.conf
aa_lib="$aa_dir"/lib
fi
trap '' 2
for file in $(ls "$aa_lib") ; do
source "$aa_lib"/"$file"
done
source "$aa_conf"
language
source "$lang_file"
export reload=true
}
main() {
update_mirrors
check_connection
set_keys
set_locale
set_zone
prepare_drives
prepare_base
graphics
add_software
install_base
configure_system
set_hostname
add_user
reboot_system
}
dialog() {
if "$screen_h" ; then
/usr/bin/dialog --colors --backtitle "$backtitle" --title "$op_title" "$@"
else
/usr/bin/dialog --colors --title "$title" "$@"
fi
}
opt="$1"
init
main
# vim: ai:ts=8:sw=8:sts=8:noet