Files
DynastyRevolution-Scripts/install.sh

53 lines
1.8 KiB
Bash

#!/bin/bash
# -----------------------------------------------------------------------
# Dynasty Revolution Universal Installer
# Authors: Dynasty Revolution & SaavageBueno
# -----------------------------------------------------------------------
BLUE='\033[38;5;45m'; GOLD='\033[38;5;178m'; RED='\033[38;5;196m'; NC='\033[0m'
REPO_RAW="https://git.dynastyrevolution.com/DYNR/DynastyRevolution-Scripts/raw/branch/main"
echo -e "${BLUE}🐉 Dynasty Revolution Systems Initializing...${NC}"
# Check if DYNR is already present
if [ -f "/usr/local/bin/dynr" ]; then
echo -e "${GOLD}⚠️ The Dynasty Framework is already established on this machine.${NC}"
echo -e "What would you like to do?"
echo "1) Reinstall (Overwrite everything)"
echo "2) Uninstall (Remove the Framework)"
echo "3) Cancel"
read -p "Selection [1-3]: " ALREADY_OPT
case $ALREADY_OPT in
2)
echo -e "${RED}🔥 Incinerating the Dynasty Framework...${NC}"
sudo rm -rf /opt/dynr
sudo rm /usr/local/bin/dynr
echo -e "${GOLD}Framework removed.${NC}"
exit 0
;;
3)
echo "Mission aborted."
exit 0
;;
*)
echo -e "${BLUE}Proceeding with Reinstallation...${NC}"
;;
esac
fi
# Standard Installation Logic
sudo mkdir -p /opt/dynr/modules
sudo chown -R $USER:$USER /opt/dynr
for dep in rclone fzf curl; do
if ! command -v $dep &> /dev/null; then
echo -e "${GOLD}Installing $dep...${NC}"
sudo apt-get update -qq && sudo apt-get install -y -qq $dep
fi
done
sudo curl -sSL "$REPO_RAW/core/dynr" -o /usr/local/bin/dynr
sudo chmod +x /usr/local/bin/dynr
echo -e "${BLUE}✨ Dynasty Core installed. Type ${GOLD}'dynr'${BLUE} to begin.${NC}"