commit 6d5ca1de2d76a9267825b6fe065133fe68ee9348 Author: shynd Date: Wed Feb 19 23:10:39 2025 +0100 init commit diff --git a/auto-install.sh b/auto-install.sh new file mode 100755 index 0000000..7f338e9 --- /dev/null +++ b/auto-install.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash +clear + +printf "\n%.0s" {1..2} +echo -e "\e[35m + ███▄ █ ██▓▒██ ██▒ ▒█████ ██████ ▄████▄ ▒█████ ███▄ █ █████▒██▓ ▄████ + ██ ▀█ █ ▓██▒▒▒ █ █ ▒░▒██▒ ██▒▒██ ▒ ▒██▀ ▀█ ▒██▒ ██▒ ██ ▀█ █ ▓██ ▒▓██▒ ██▒ ▀█▒ +▓██ ▀█ ██▒▒██▒░░ █ ░▒██░ ██▒░ ▓██▄ ▒▓█ ▄ ▒██░ ██▒▓██ ▀█ ██▒▒████ ░▒██▒▒██░▄▄▄░ +▓██▒ ▐▌██▒░██░ ░ █ █ ▒ ▒██ ██░ ▒ ██▒▒▓▓▄ ▄██▒▒██ ██░▓██▒ ▐▌██▒░▓█▒ ░░██░░▓█ ██▓ +▒██░ ▓██░░██░▒██▒ ▒██▒░ ████▓▒░▒██████▒▒▒ ▓███▀ ░░ ████▓▒░▒██░ ▓██░░▒█░ ░██░░▒▓███▀▒ +░ ▒░ ▒ ▒ ░▓ ▒▒ ░ ░▓ ░░ ▒░▒░▒░ ▒ ▒▓▒ ▒ ░░ ░▒ ▒ ░░ ▒░▒░▒░ ░ ▒░ ▒ ▒ ▒ ░ ░▓ ░▒ ▒ +░ ░░ ░ ▒░ ▒ ░░░ ░▒ ░ ░ ▒ ▒░ ░ ░▒ ░ ░ ░ ▒ ░ ▒ ▒░ ░ ░░ ░ ▒░ ░ ▒ ░ ░ ░ + ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ▒ ░░ ░ ░ + ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ + ░ +\e[0m" +printf "\n%.0s" {1..1} + +OK="$(tput setaf 2)[OK]$(tput sgr0)" +ERROR="$(tput setaf 1)[ERROR]$(tput sgr0)" +NOTE="$(tput setaf 3)[NOTE]$(tput sgr0)" +INFO="$(tput setaf 4)[INFO]$(tput sgr0)" +WARN="$(tput setaf 1)[WARN]$(tput sgr0)" +CAT="$(tput setaf 6)[ACTION]$(tput sgr0)" +MAGENTA="$(tput setaf 5)" +ORANGE="$(tput setaf 214)" +WARNING="$(tput setaf 1)" +YELLOW="$(tput setaf 3)" +GREEN="$(tput setaf 2)" +BLUE="$(tput setaf 4)" +SKY_BLUE="$(tput setaf 6)" +RESET="$(tput sgr0)" + +set -e + +if [ -n "$(grep -i nixos < /etc/os-release)" ]; then + echo "${OK} verified distro to be nixos." +else + echo "$ERROR this is not nixos or the distro info is not available!" + exit 1 +fi + +if command -v git &> /dev/null; then + echo "$OK git is installed, continuing with installation..." + echo "-----" +else + echo "$ERROR git is not installed, please install git and try again." +fi \ No newline at end of file