forked from briankavanaugh/APA-7th-Edition
-
Notifications
You must be signed in to change notification settings - Fork 0
/
APASeventhEdition.sh
23 lines (18 loc) · 903 Bytes
/
APASeventhEdition.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# Define the source URL for the file
SOURCE_URL="https://raw.githubusercontent.com/briankavanaugh/APA-7th-Edition/main/APASeventhEdition.xsl"
# Get the current username
USERNAME=$(whoami)
# Define the destination paths
DESTINATION_PATH_1="/Applications/Microsoft Word.app/Contents/Resources/Style/APASeventhEdition.xsl"
DESTINATION_PATH_2="/Users/$USERNAME/Library/Containers/com.microsoft.Word/Data/Library/Application Support/Microsoft/Office/Style/APASeventhEdition.xsl"
# Download the file and place it in the first destination
sudo curl "$SOURCE_URL" -o "$DESTINATION_PATH_1"
# Check if the file was successfully downloaded
if [ -e "$DESTINATION_PATH_1" ]; then
# If successful, also copy it to the second destination
sudo cp "$DESTINATION_PATH_1" "$DESTINATION_PATH_2"
echo "File placed in both locations successfully."
else
echo "Failed to download the file."
fi