3 ###################################################
4 ## This is the official installer for instantOS ##
5 ## instantOS is migrating from calamares to this ##
6 ###################################################
8 # main script calling others
10 if ! whoami | grep -iq '^root'; then
11 echo "not running as root, switching"
12 curl -Lg git.io/instantarch | sudo bash
16 if [ -e /usr/share/liveutils ]; then
17 echo "preparing isntallation
18 OK" | instantmenu -c -bw 4 -l 2 &
24 curl -s 'https://raw.githubusercontent.com/instantOS/instantLOGO/master/ascii.txt' | sed 's/^/ /g'
29 if ! command -v imenu; then
30 touch /tmp/removeimenu
34 curl -s https://raw.githubusercontent.com/instantOS/imenu/master/imenu.sh >/usr/bin/imenu
35 chmod 755 /usr/bin/imenu
37 while ! command -v imenu; do
38 echo "installing imenu"
39 curl -s https://raw.githubusercontent.com/instantOS/imenu/master/imenu.sh >/usr/bin/imenu
40 chmod 755 /usr/bin/imenu
44 if [ -e /usr/share/liveutils ]; then
47 echo "$@" >/opt/instantprogress
52 pacman -Sy --noconfirm
53 if command -v pacstrap; then
54 pacman -S reflector --noconfirm
55 echo "selecting fastest mirror"
56 reflector --latest 40 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist
59 # install dependencies
60 pacman -Sy --noconfirm
61 pacman -S git --noconfirm --needed
64 [ -e instantARCH ] && rm -rf instantARCH
65 git clone --depth=1 https://github.com/instantos/instantARCH.git
71 echo "ask failed" && exit
78 ./localinstall.sh &>/opt/localinstall &&
79 echo "system install" &&
80 ./systeminstall.sh &>/opt/systeminstall
82 # ask to reboot, upload error data if install failed
83 if ! [ -e /opt/installfailed ] || ! [ -e /opt/installsuccess ]; then
84 imenu -c "installation finished. reboot?" && touch /tmp/instantosreboot
86 echo "installaion failed"
87 echo "uploading error data"
89 cat /opt/localinstall >/opt/install.log
91 if [ -e /opt/systeminstall ]; then
92 cat /opt/systeminstall >>/opt/install.log
96 cp /root/instantARCH/data/netrc ~/.netrc
97 curl -n -F 'f:1=@install.log' ix.io
98 dialog --msgbox "installation failed
99 please go to https://instantos.github.io/instantos.github.io/support
100 for assistance or error reporting" 1000 1000
104 if [ -e /tmp/removeimenu ]; then
108 echo "installation finished"
112 [ -e /tmp/instantosreboot ] && reboot