diff --git a/install.sh b/install.sh index c0857dc..55ccaf9 100644 --- a/install.sh +++ b/install.sh @@ -6,7 +6,8 @@ # --- Brighter 256-Color Palette --- BLUE='\033[38;5;45m'; PURPLE='\033[38;5;127m'; GOLD='\033[38;5;178m'; RED='\033[38;5;196m'; NC='\033[0m' -VERSION="1.2.3" +# --- THE SOURCE OF TRUTH (Synced to 2.3.6) --- +VERSION="2.3.6" REPO_RAW="https://git.dynastyrevolution.com/DYNR/DynastyRevolution-Scripts/raw/branch/main" CURRENT_DATE=$(date +"%m-%d-%Y") @@ -28,6 +29,7 @@ echo -e "${PURPLE}-------------------------------------------------${NC}" # --- Version & Existing Install Detection --- if [ -f "/usr/local/bin/dynr" ]; then + # Detect version from the existing binary CURRENT_VER=$(grep -m 1 "VERSION=" /usr/local/bin/dynr | sed -E 's/.*VERSION="?([0-9.]+)"?.*/\1/') [[ -z "$CURRENT_VER" ]] && CURRENT_VER="Unknown" @@ -65,7 +67,6 @@ if [ -f "/usr/local/bin/dynr" ]; then fi if [[ ! -z "$CMD_INPUT" ]]; then - # Check if module is missing locally if [ ! -f "/opt/dynr/modules/$CMD_INPUT" ]; then echo -e "${GOLD}🔎 Module '$CMD_INPUT' is not local, but exists in the Cloud.${NC}" read -p "📥 Manifest this scroll from the heavens? (y/n): " CONFIRM < /dev/tty @@ -79,24 +80,24 @@ if [ -f "/usr/local/bin/dynr" ]; then sudo chmod +x "/opt/dynr/modules/$CMD_INPUT" echo -e "${BLUE}✅ Manifested!${NC}" else - echo -e "${RED}❌ Failed to retrieve scroll. Check your cloud modules.${NC}" - rm -f "/tmp/$CMD_INPUT" - exit 1 + echo -e "${RED}❌ Failed to retrieve scroll.${NC}" + rm -f "/tmp/$CMD_INPUT"; exit 1 fi else - echo -e "${GOLD}🐉 Operation cancelled. The heavens remain undisturbed.${NC}" - exit 0 + echo -e "${GOLD}🐉 Operation cancelled.${NC}"; exit 0 fi fi - - # --- FIXED EXECUTION LINE --- - # We use