-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·38 lines (29 loc) · 872 Bytes
/
install.sh
File metadata and controls
executable file
·38 lines (29 loc) · 872 Bytes
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
#!/usr/bin/env bash
# The current directory
DIR="$( cd "$( dirname "$0" )" && pwd )"
# The name of the addon
ADDON_NAME="automatic-guild-interactions"
# The path to the WoW addon directory you want to install to
WOW_ADDON_DIR="${1}"
# The local directory in this repository
LOCAL_ADDON_DIR="${DIR}"
# The addon directory inside the provided WoW addon folder
INSTALL_DIR="${WOW_ADDON_DIR}/${ADDON_NAME}"
# If the addon already exists then delete it
if [[ -d "${INSTALL_DIR}" ]]
then
echo "Cleaning existing addon"
rm -r "${INSTALL_DIR}"
fi
# Install the addon
echo "Installing addon"
mkdir -p "${INSTALL_DIR}"
cp "${LOCAL_ADDON_DIR}/${ADDON_NAME}.lua" "${INSTALL_DIR}"
TOC_FILES=(
"_Mainline"
"_Vanilla"
"_Wrath"
)
for TOC_FILE_SUFFIX in ${TOC_FILES[@]}; do
cp "${LOCAL_ADDON_DIR}/${ADDON_NAME}${TOC_FILE_SUFFIX}.toc" "${INSTALL_DIR}"
done