Finalized the compatibility check function.
This commit is contained in:
@@ -13,6 +13,8 @@ echod() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
|
echo -e "\n ✅ Cleaning up..."
|
||||||
|
|
||||||
rm -${DIR_RM_FLAGS} /run/numbus/logs
|
rm -${DIR_RM_FLAGS} /run/numbus/logs
|
||||||
rm -${DIR_RM_FLAGS} /run/numbus/web
|
rm -${DIR_RM_FLAGS} /run/numbus/web
|
||||||
rm -${DIR_RM_FLAGS} /run/numbus/config
|
rm -${DIR_RM_FLAGS} /run/numbus/config
|
||||||
@@ -27,14 +29,14 @@ compatibility_check() {
|
|||||||
echod "\n ✅ NixOS system detected."
|
echod "\n ✅ NixOS system detected."
|
||||||
else
|
else
|
||||||
TEST_FAIL=$((TEST_FAIL + 1))
|
TEST_FAIL=$((TEST_FAIL + 1))
|
||||||
echo "\n ❌ You are not on a NixOS based system. This is required to continue."
|
echo -e "\n ❌ You are not on a NixOS based system. This is required to continue."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$(uname -m)" == "x86_64" ]]; then
|
if [[ "$(uname -m)" == "x86_64" ]]; then
|
||||||
echod "\n ✅ x86_64 system detected."
|
echod "\n ✅ x86_64 system detected."
|
||||||
else
|
else
|
||||||
TEST_FAIL=$((TEST_FAIL + 1))
|
TEST_FAIL=$((TEST_FAIL + 1))
|
||||||
echo "\n ❌ You are not on a x86_64 based system. This is required to continue."
|
echo -e "\n ❌ You are not on a x86_64 based system. This is required to continue."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${TEST_FAIL} -gt 0 ]]; then
|
if [[ ${TEST_FAIL} -gt 0 ]]; then
|
||||||
@@ -42,7 +44,10 @@ compatibility_check() {
|
|||||||
"No" \
|
"No" \
|
||||||
"Yes, I know what I am doing")
|
"Yes, I know what I am doing")
|
||||||
[[ "${COMPATIBILITY_OVERRIDE}" == "No" ]] && exit 1
|
[[ "${COMPATIBILITY_OVERRIDE}" == "No" ]] && exit 1
|
||||||
|
[[ "${COMPATIBILITY_OVERRIDE}" != "No" ]] && echo -e "\n ⚠️ Continuing anyways, this is not supported by Numbus."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
launch_configurator() {
|
launch_configurator() {
|
||||||
@@ -873,8 +878,8 @@ fi
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
clear
|
clear
|
||||||
|
|
||||||
compatibility_check
|
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
compatibility_check
|
||||||
# --- PRE MAIN LOGIC ---<
|
# --- PRE MAIN LOGIC ---<
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user