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 pgrep instantmenu || echo "preparing installation
18 OK" | instantmenu -c -bw 4 -l 2 &
23 curl -s 'https://raw.githubusercontent.com/instantOS/instantLOGO/master/ascii.txt' | sed 's/^/ /g'
28 if ! command -v imenu; then
29 touch /tmp/removeimenu
33 curl -s https://raw.githubusercontent.com/instantOS/imenu/master/imenu.sh >/usr/bin/imenu
34 chmod 755 /usr/bin/imenu
36 while ! command -v imenu; do
37 echo "installing imenu"
38 curl -s https://raw.githubusercontent.com/instantOS/imenu/master/imenu.sh >/usr/bin/imenu
39 chmod 755 /usr/bin/imenu
43 if [ -e /usr/share/liveutils ]; then
46 echo "$@" >/opt/instantprogress
50 if command -v python; then
51 echo "import time; time.sleep(10009)" | python &
57 pacman -Sy --noconfirm
58 pacman -S git --noconfirm --needed
61 [ -e instantARCH ] && rm -rf instantARCH
62 git clone --depth=1 https://github.com/instantos/instantARCH.git
65 # use alternative versions of the installer
69 echo "switching to testing branch"
70 git checkout -b testing
73 if ! [ -e /root/manualarch ]; then
74 echo "no manual instantARCH version found. Please clone it to /root/manualarch"
80 cp -r /root/manualarch/* .
83 echo "running normal installer version"
94 [ -e /usr/share/liveutils ] && pkill instantmenu
99 if ! [ -e /opt/instantos/installcanceled ]; then
100 imenu -m "ask failed"
101 echo "ask failed" && exit
103 rm /opt/instantos/installcanceled
104 pkill instantosinstall
113 ./localinstall.sh 2>&1 | tee /opt/localinstall &&
114 echo "system install" &&
115 ./systeminstall.sh 2>&1 | tee /opt/systeminstall
120 sudo pkill instantmenu
124 echo "uploading installation log"
125 cat /opt/localinstall >/opt/install.log
127 if [ -e /opt/systeminstall ]; then
128 cat /opt/systeminstall >>/opt/install.log
132 cp /root/instantARCH/data/netrc ~/.netrc
133 curl -n -F 'f:1=@install.log' ix.io
134 dialog --msgbox "installation failed
135 please go to https://instantos.github.io/instantos.github.io/support
136 for assistance or error reporting" 1000 1000
140 # ask to reboot, upload error data if install failed
141 if ! [ -e /opt/installfailed ] || ! [ -e /opt/installsuccess ]; then
142 if command -v installapplet; then
143 notify-send "rebooting"
145 if iroot logging; then
152 echo "installaion failed"
153 echo "uploading error data"
157 if [ -e /tmp/removeimenu ]; then
161 echo "installation finished"