diff --git a/install.sh b/install.sh index 6e9aa1f..a91e48f 100644 --- a/install.sh +++ b/install.sh @@ -49,4 +49,34 @@ if [ -f "/usr/local/bin/dynr" ]; then # Exit/Quit Check if [[ "$CMD_INPUT" == "exit" ]] || [[ "$CMD_INPUT" == "quit" ]]; then - echo -e "${GOLD}🐉 The Dynasty awaits your return. Farewell.${ \ No newline at end of file + echo -e "${GOLD}🐉 The Dynasty awaits your return. Farewell.${NC}" + exit 0 + fi + + [[ ! -z "$CMD_INPUT" ]] && dynr $CMD_INPUT + exit 0 + ;; + 2) echo -e "${BLUE}Proceeding with Reinstallation...${NC}" ;; + 3) + echo -e "${RED}🔥 Incinerating the Dynasty...${NC}" + sudo rm -rf /opt/dynr /usr/local/bin/dynr + exit 0 ;; + *) exit 0 ;; + esac +fi + +# --- Standard Installation Logic --- +sudo mkdir -p /opt/dynr/modules +sudo chown -R $USER:$USER /opt/dynr + +for dep in rclone fzf curl procps; 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 v2.3.4 installed.${NC}" \ No newline at end of file