summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-09-15 00:22:26 +0100
committerdavidovski <david@davidovski.xyz>2022-09-15 00:22:26 +0100
commit31be9f6f20bac11120b8064c5a8ba78e4c713ade (patch)
tree6712847c8e81369458c18920bda2d72bb48a1099
parent62ac6c319289550931696346ce08f2c0ed70fc0d (diff)
Fixed breaking if missing conf file
-rwxr-xr-xscripts/install.sh2
-rw-r--r--src/bootstrap.sh1
-rwxr-xr-xsrc/profile.sh2
3 files changed, 5 insertions, 0 deletions
diff --git a/scripts/install.sh b/scripts/install.sh
index da59cdd..89ee11b 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -30,7 +30,9 @@ echo "Please make sure that you have correctly formatted any partitions and moun
}
$XIPKG $XIFLAGS sync
+mkdir -p $SYSROOT
$XIPKG $XIFLAGS -r $SYSROOT bootstrap
+mkdir -p $SYSROOT
$XIPKG $XIFLAGS -r $SYSROOT install $default_packages
$XIPKG $XIFLAGS -r $SYSROOT keyimport $default_key
diff --git a/src/bootstrap.sh b/src/bootstrap.sh
index d82380d..7215d9b 100644
--- a/src/bootstrap.sh
+++ b/src/bootstrap.sh
@@ -58,6 +58,7 @@ bootstrap () {
if [ -e ${SYSROOT} ] && [ "$(ls -1 ${SYSROOT})" != "0" ]; then
if prompt_question "${WHITE}System already exists on ${SYSROOT}, clear?"; then
+ umount -r ${SYSROOT}/*
rm -rf ${SYSROOT}/*
fi
fi
diff --git a/src/profile.sh b/src/profile.sh
index 165bf0a..6eb3bbf 100755
--- a/src/profile.sh
+++ b/src/profile.sh
@@ -8,6 +8,8 @@ export HBAR_RED="-c ${BLACK}${BG_RED}"
export CONF_FILE="/etc/xipkg.conf"
+[ ! -f "$CONF_FILE" ] && echo "No config found!" && exit 1
+
export CURL_OPTS="-sSL"
export DEFAULT_OPTION=$(parseconf -v default_cmd)