changes for dynamic core

This commit is contained in:
2026-02-06 02:39:44 -05:00
parent 0ca53921ea
commit e60985d2a5

View File

@@ -1,10 +1,13 @@
#!/bin/bash
# Dynasty RClone Module
# DYNR Module: Rclone Wizard
run_rclone_wizard() {
# Color variables match core
BLUE='\033[38;5;45m'; PURPLE='\033[38;5;127m'; GOLD='\033[38;5;178m'; NC='\033[0m'
HIST_FILE="$HOME/.rclone_dir_history"
# 1. Action Menu
echo -e "${PURPLE}--- DYNASTY RCLONE WIZARD ---${NC}"
# 1. Action Selection
PS3=$(echo -e "\n${BLUE}Select Stance:${NC} ")
options=("Copy" "Move" "Quit")
select opt in "${options[@]}"; do
@@ -15,27 +18,28 @@ run_rclone_wizard() {
esac
done
# 2. Files (Space-Safe)
echo -e "\n${BLUE}📜 Unrolling archives...${NC}"
# 2. File Selection (Space-Safe)
echo -e "\n${BLUE}📜 Gathering archives...${NC}"
FILES=$(find . -maxdepth 2 -not -path '*/.*' -print0 | fzf --read0 -m --ansi --color="fg:#1fd9f0,hl:#dba608")
[ -z "$FILES" ] && return
# 3. Remote
REMOTE=$(rclone listremotes | fzf --ansi --header="Select Kingdom")
# 3. Remote Selection
REMOTE=$(rclone listremotes | fzf --ansi --header="Select Kingdom (Remote)")
[ -z "$REMOTE" ] && return
# 4. Destination (History)
# 4. Destination History
if [ -f "$HIST_FILE" ]; then
DEST_DIR=$( (echo "--- NEW PATH ---"; cat "$HIST_FILE") | fzf)
fi
if [[ "$DEST_DIR" == "--- NEW PATH ---" ]] || [[ -z "$DEST_DIR" ]]; then
read -p "Path: " DEST_DIR
read -p "Enter Target Path: " DEST_DIR
[ ! -z "$DEST_DIR" ] && echo "$DEST_DIR" >> "$HIST_FILE" && sort -u -o "$HIST_FILE" "$HIST_FILE"
fi
# 5. Execute
# 5. Execution
echo "$FILES" | tr '\0' '\n' | while read -r FILE; do
if [ ! -z "$FILE" ]; then
echo -e "${BLUE}🐉 Transmitting:${NC} $FILE"
rclone "$ACTION" -P "$FILE" "$REMOTE$DEST_DIR"
echo -e "\a"
fi