summaryrefslogtreecommitdiff
path: root/install-system.sh
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-01-07 22:29:50 +0000
committerdavidovski <david@davidovski.xyz>2022-01-07 22:29:50 +0000
commit7800fd6c3cc203f11f6132ec2592ab33badf6331 (patch)
tree201aeeaed6e9de530758cb022d1a07ec25a5b2d5 /install-system.sh
parent954aac2b58f459b0bced68dc87608b6ba6ed45bb (diff)
grouped together loading bars and merged file sizes into the sync phase
Diffstat (limited to 'install-system.sh')
-rwxr-xr-xinstall-system.sh46
1 files changed, 38 insertions, 8 deletions
diff --git a/install-system.sh b/install-system.sh
index 33766e1..eeb7e9c 100755
--- a/install-system.sh
+++ b/install-system.sh
@@ -5,8 +5,23 @@
KEY="davidovski https://xi.davidovski.xyz/repo/xi.pub"
+XI_OPTS="-nyl"
+
R=$1
+[ $# -eq 0 ] && echo "Please specify where you would like to instal the system" && exit 1
+
+if [ -e $R ]; then
+ printf "Remove existing system? [Y/n] "
+ read response
+
+ if [ "$response" != "n" ]; then
+ rm -rf $R
+ echo "removed $R"
+ fi
+fi
+
+
mkdir -p $R
mkdir -p $R/tmp
mkdir -p $R/dev
@@ -28,17 +43,31 @@ ln -s usr/lib usr/lib64
ln -s usr/local usr
-xi sync
-
-xi -nyl --root . install $(ls /var/lib/xipkg/packages/core)
-xi -nyl --root . keyimport $KEY
+xi sync &&
+xi $XI_OPTS --root . install $(ls /var/lib/xipkg/packages/core) &&
+xi $XI_OPTS --root . keyimport $KEY &&
# chroot into the system to install xipkg and any postinstall scripts
-xi -nyl --root . install xipkg
+xi $XI_OPTS --root . install xipkg &&
+
+cd ../.. &&
+
+echo "base system installed next to do:" &&
+echo " xichroot into system" &&
+echo " set hostname at /etc/hostname" &&
+echo " configure DNS at /etc/resolv.conf" &&
+echo " xi sync" &&
+echo " install any additional packages" &&
+echo " compile and install kernel" &&
+echo " configure and install grub" &&
+echo " * hope that the system works!" &&
+echo "have fun!" &&
+exit 0;
+
+echo "something went wrong"
+exit 0;
-cd bin
-ln -s bash sh
-cd ../..
+## leftover autoconfig scripts
mkdir -p $R/var/lib/xipkg/
cp -r /var/lib/xipkg/packages $R/var/lib/xipkg
@@ -46,6 +75,7 @@ cp -r /var/lib/xipkg/keychain $R/var/lib/xipkg
# Autoconfiguring some things like network
+mkdir -p $R/etc
echo "xilinux" > $R/etc/hostname
cat > $R/etc/resolv.conf << "EOF"