-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.sh
executable file
·40 lines (34 loc) · 858 Bytes
/
init.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
#/bin/bash
if [[ $1 == "" ]]; then
echo Copies Spewnity Assets and sets up a default structure of asset folders in the unity project folder specified
echo Usage: init.sh path-to-unity-folder
exit
fi
function badFolder {
echo Missing Unity Folder: $1
echo Aborting...
exit
}
echo Verifying $1 is a Unity project folder
path="$1/ProjectSettings/"
if [[ ! -d "$path" ]]; then
badFolder $path
fi
path="$1/Assets/"
if [[ ! -d "$path" ]]; then
badFolder $path
fi
dir=`dirname $0`
echo Copying gitignore
cp "${dir}/.gitignore" $1
echo Copying Assets
cp -r "$dir/Assets/Spewnity" "$1/Assets/"
echo Creating common folders
mkdir -p "$1/Assets/Scenes/"
mkdir -p "$1/Assets/Scripts/"
mkdir -p "$1/Assets/Materials/"
mkdir -p "$1/Assets/Art/"
mkdir -p "$1/Assets/Audio/"
mkdir -p "$1/Assets/Prefabs/"
mkdir -p "$1/Assets/Fonts/"
mkdir -p "$1/Raw/AudioRecs"