fix version mismatch
All checks were successful
Update Dispatches / refresh-news (push) Successful in 3s

This commit is contained in:
2026-02-06 08:26:35 -05:00
parent 63933aa27a
commit 97ddce0d93

View File

@@ -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 </dev/tty to ensure interactive programs like 'top' can access the terminal
dynr "$CMD_INPUT" </dev/tty
fi
exit 0
;;
2)
echo -e "${BLUE}Proceeding with Update...${NC}"
# THE FIX: This actually overwrites the bin with the latest code
sudo curl -sSL "$REPO_RAW/install.sh" -o /usr/local/bin/dynr
sudo chmod +x /usr/local/bin/dynr
echo -e "${GOLD}✅ System Manifest Updated to v$VERSION${NC}"
exit 0
;;
3)
echo -e "${RED}Removing Dynasty files...${NC}"