-
Notifications
You must be signed in to change notification settings - Fork 14
/
copy-project.sh
executable file
·48 lines (45 loc) · 1.69 KB
/
copy-project.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
45
46
47
48
#!/bin/bash
# Change path value to the project path you want to copy
path="/home/wano/Documents/RPG Paper Maker Games/project-without-name"
# --------------------------------------------------------
delete_folder () {
if [[ -d "$1" ]]
then
rm -R "$1"
fi
}
if [[ -d "${path}" ]]
then
if [[ ! -d "./Content" ]]
then
mkdir Content
mkdir Content/Datas
mkdir Content/Datas/Scripts
fi
cp -r ./Content/Datas/Scripts ./Scripts-temp-copy
delete_folder "./Content/Datas"
cp -r "${path}/resources/app/Content/Datas" "./Content/Datas"
delete_folder "./Content/Datas/Scripts"
cp -r ./Scripts-temp-copy ./Content/Datas/Scripts
delete_folder "./Scripts-temp-copy"
delete_folder "./Content/Images"
delete_folder "./Content/Shapes"
delete_folder "./Content/Songs"
delete_folder "./Content/Videos"
delete_folder "./Content/Fonts"
delete_folder "./Content/Styles"
cp -r "${path}/resources/app/Content/Images" "./Content/Images"
cp -r "${path}/resources/app/Content/Shapes" "./Content/Shapes"
cp -r "${path}/resources/app/Content/Songs" "./Content/Songs"
cp -r "${path}/resources/app/Content/Videos" "./Content/Videos"
cp -r "${path}/resources/app/Content/Fonts" "./Content/Fonts"
cp -r "${path}/resources/app/Content/Styles" "./Content/Styles"
delete_folder "./Content/Datas/Scripts/Plugins"
cp -r "${path}/resources/app/Content/Datas/Scripts/Plugins" "./Content/Datas/Scripts/Plugins"
delete_folder "./Content/Datas/Scripts/Libs"
cp -r "${path}/resources/app/Content/Datas/Scripts/Libs" "./Content/Datas/Scripts/Libs"
delete_folder "./Content/Datas/Scripts/Shaders"
cp -r "${path}/resources/app/Content/Datas/Scripts/Shaders" "./Content/Datas/Scripts/Shaders"
else
echo "The project ${path} doesn't exists"
fi