forked from codergautam/swordbattle.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdatecosmetics.sh
44 lines (36 loc) · 1.14 KB
/
updatecosmetics.sh
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
#!/bin/bash
echo "Update Cosmetics Script for Swordbattle.io.\nThis will delete cosmetics.json caches in client\\src\\game and api\\src"
read -p "Press any key to continue... " -n1 -s
echo
echo "Starting script..."
echo "Deleting client/src/game/cosmetics.json..."
if [ -f client/src/game/cosmetics.json ]; then
rm client/src/game/cosmetics.json
echo "Deleted successfully."
else
echo "File not found."
fi
echo "Deleting server/src/cosmetics.json..."
if [ -f server/src/cosmetics.json ]; then
rm server/src/cosmetics.json
echo "Deleted successfully."
else
echo "File not found."
fi
echo "Deleting api/src/cosmetics.json..."
if [ -f api/src/cosmetics.json ]; then
rm api/src/cosmetics.json
echo "Deleted successfully."
else
echo "File not found."
fi
echo "Copying new cosmetics.json to client/src/game..."
cp cosmetics.json client/src/game/cosmetics.json
echo "Copy complete."
echo "Copying new cosmetics.json to server/src..."
cp cosmetics.json server/src/cosmetics.json
echo "Copy complete."
echo "Copying new cosmetics.json to api/src..."
cp cosmetics.json api/src/cosmetics.json
echo "Copy complete."
echo "Script completed."