forked from StarT-Dev-Team/Star-Technology
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackmode_picker.sh
More file actions
executable file
·77 lines (67 loc) · 1.95 KB
/
packmode_picker.sh
File metadata and controls
executable file
·77 lines (67 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash
# Enable colors
GREEN="\033[0;36m"
RESET="\033[0m"
# Title
echo -e "${GREEN}"
echo "======================================================="
echo
echo " Star Technology Packmode Picker"
echo
echo "======================================================="
echo -e "${RESET}"
# Set up paths
script_dir="$(cd "$(dirname "$0")" && pwd)"
default_path="$script_dir/packmode/default"
hard_path="$script_dir/packmode/hard"
abydos_path="$script_dir/packmode/abydos"
target_path="$script_dir"
# Display menu
echo "[D] Default - the standard experience"
echo "[H] Hard - for the masochistic"
echo "[A] Abydos - dehydration enjoyer"
echo
# Get user choice
while true; do
read -rp "Enter Packmode (D, H, or A): " choice
case "${choice^^}" in
D)
selected="Default"
selected_path="$default_path"
break
;;
H)
selected="Hard"
selected_path="$hard_path"
break
;;
A)
selected="Abydos"
selected_path="$abydos_path"
break
;;
*)
echo "Invalid choice. Please select D, H, or A."
;;
esac
done
# Apply packmode
echo
echo "Applying Packmode [$selected]..."
echo
echo "======================================================================================="
echo "======================================================================================="
# Remove existing chapters directory
chapters_path="$target_path/config/ftbquests/quests/chapters"
if [ -d "$chapters_path" ]; then
rm -rf "$chapters_path"
fi
# Copy selected packmode files to target
cp -r "$selected_path/"* "$target_path/"
echo "======================================================================================="
echo "======================================================================================="
echo
echo "Packmode switch complete!"
echo
# Pause (optional)
read -rp "Press Enter to exit..."