Compare commits
3 Commits
testing
...
production
| Author | SHA1 | Date | |
|---|---|---|---|
| 6982a24dfd | |||
| 5f480bb12d | |||
| a45dabe28e |
+2
-2
@@ -1,5 +1,5 @@
|
||||
config/
|
||||
web/ux/
|
||||
/config/
|
||||
/web/ux/
|
||||
test*
|
||||
.DS_Store
|
||||
.env
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/config/
|
||||
web/ux/
|
||||
/web/ux/
|
||||
test*
|
||||
.DS_Store
|
||||
.env
|
||||
Executable
+51
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Numbus Installer Bootstrap
|
||||
# This script clones the repository and launches the NixOS deployment script.
|
||||
|
||||
REPO_URL="https://gittea.dev/numbus/numbus.git"
|
||||
INSTALL_DIR="/tmp/numbus-installer"
|
||||
|
||||
echo "\n ☁️ Initializing Numbus Installer..."
|
||||
|
||||
# 1. Check for Nix
|
||||
TEST_FAIL=0
|
||||
|
||||
if [[ -r /etc/os-release ]] && grep -qi '^ID=nixos\b' /etc/os-release; then
|
||||
echo -e "\n ✅ NixOS system detected."
|
||||
else
|
||||
TEST_FAIL=$((TEST_FAIL + 1))
|
||||
echo -e "\n ❌ You are not on a NixOS based system. This is required to continue."
|
||||
fi
|
||||
|
||||
if [[ "$(uname -m)" == "x86_64" ]]; then
|
||||
echo -e "\n ✅ x86_64 system detected."
|
||||
else
|
||||
TEST_FAIL=$((TEST_FAIL + 1))
|
||||
echo -e "\n ❌ You are not on a x86_64 based system. This is required to continue."
|
||||
fi
|
||||
|
||||
if [[ ${TEST_FAIL} -gt 0 ]]; then
|
||||
COMPATIBILITY_OVERRIDE=$(gum choose --header "Some compatibility checks failed. The installation will VERY LIKELY fail. Continue ?" \
|
||||
"No" \
|
||||
"Yes, I know what I am doing")
|
||||
[[ "${COMPATIBILITY_OVERRIDE}" == "No" ]] && exit 1
|
||||
echo -e "\n ⚠️ Continuing anyways, this is not supported by Numbus."
|
||||
fi
|
||||
|
||||
# 2. Clone/Update the repository
|
||||
if [[ -e ${INSTALL_DIR}/config/* ]]; then
|
||||
echo " ⚠️ It seems you have already run this script. Previously generated files need to be cleaned up."
|
||||
OLD_CONFIG_PATH="${INSTALL_DIR}/trash/$(date +"%Y-%m-%d-%Hh%M")"
|
||||
mkdir -p ${OLD_CONFIG_PATH}
|
||||
mv ${INSTALL_DIR} ${OLD_CONFIG_PATH}
|
||||
echo " ✅ Your files have been moved to the ${OLD_CONFIG_PATH} directory. You can retrieve them there if needed."
|
||||
fi
|
||||
|
||||
git clone "${REPO_URL}" "${INSTALL_DIR}" -q
|
||||
|
||||
# 3. Launch the deployment script
|
||||
cd "${INSTALL_DIR}/script"
|
||||
chmod +x deploy.sh
|
||||
./deploy.sh
|
||||
Reference in New Issue
Block a user