-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.repackageReset
executable file
·28 lines (28 loc) · 1.15 KB
/
.repackageReset
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
#!/bin/bash
# Repackage Reset script allows us to quickly create a .reset.tgz package of the game for easy restore to default
clear
echo "##########[WARNING DANGEROUS SCRIPT]########"
echo "########## BE SURE THAT ALL GAME ########"
echo "########## DIRECTORIES AND FILES ########"
echo "########## ARE IN THEIR CORRECT ########"
echo "########## STATES BEFORE RUNNING ########"
echo "########## THIS SCRIPT ########"
echo -e "\n"
option=""
read -p "Did you read the warning above and still want to proceed? (Y/N)- " option
if [[ $option == "Y" ]] || [[ $option == 'y' ]]
then
# perform these steps
rm .reset.tgz
tar --exclude='./startMission' --exclude='./.reset.tgz.bkup' --exclude='./.git' --exclude='./.bash_prompt_command*' --exclude='.repackageReset' --exclude='./README.md' --exclude='./LICENSE' -czpvf .reset.tgz .
rm -rf ./{.art,HQ,.objects,.player,.reset.tgz.bkup,.rooms,.missions}
cp .reset.tgz .reset.tgz.bkup
tar -xzpvf .reset.tgz .
elif [[ $option == "N" ]] || [[ $option == 'n' ]]
then
# perform these steps
echo "Everything was left as it was"
else
# perform these steps
echo "Invalid option, so we left everything as it was"
fi