-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure
executable file
·67 lines (58 loc) · 2.46 KB
/
configure
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
# This script assembles Scenes.xctemplate from separate templates.
# MIT (2016) by Ivan Rublev, based on script by JesusCamacho.
viewCustom="UIViewController + View"
view="UIViewController"
table="UITableViewController"
collection="UICollectionViewController"
rm -rf Scene.xctemplate/"$viewCustom"
rm -rf Scene.xctemplate/"$view"
rm -rf Scene.xctemplate/"$table"
rm -rf Scene.xctemplate/"$collection"
## View Contreoller.xctemplate
cp -rf View\ Controller.xctemplate/"$viewCustom" Scene.xctemplate
cp -rf View\ Controller.xctemplate/"$view" Scene.xctemplate
cp -rf View\ Controller.xctemplate/"$table" Scene.xctemplate
cp -rf View\ Controller.xctemplate/"$collection" Scene.xctemplate
## Configurator.xctemplate
config="Configurator.xctemplate"
configFile="___FILEBASENAME___Configurator.*"
cp $config/$configFile Scene.xctemplate/"$viewCustom"
cp $config/$configFile Scene.xctemplate/"$view"
cp $config/$configFile Scene.xctemplate/"$table"
cp $config/$configFile Scene.xctemplate/"$collection"
## Interactor.xctemplate
int="Interactor.xctemplate"
intFile="___FILEBASENAME___Interactor*.*"
cp $int/$intFile Scene.xctemplate/"$viewCustom"
cp $int/$intFile Scene.xctemplate/"$view"
cp $int/$intFile Scene.xctemplate/"$table"
cp $int/$intFile Scene.xctemplate/"$collection"
## Boundary Models.xctemplate
model="Boundary Models.xctemplate"
modelFile="___FILEBASENAME___BoundaryModels.*"
cp "$model"/$modelFile Scene.xctemplate/"$viewCustom"
cp "$model"/$modelFile Scene.xctemplate/"$view"
cp "$model"/$modelFile Scene.xctemplate/"$table"
cp "$model"/$modelFile Scene.xctemplate/"$collection"
## Presenter.xctemplate
pres="Presenter.xctemplate"
presFile="___FILEBASENAME___Presenter*.*"
cp $pres/$presFile Scene.xctemplate/"$viewCustom"
cp $pres/$presFile Scene.xctemplate/"$view"
cp $pres/$presFile Scene.xctemplate/"$table"
cp $pres/$presFile Scene.xctemplate/"$collection"
## Router.xctemplate
router="Router.xctemplate"
routerFile="___FILEBASENAME___Router.*"
cp $router/$routerFile Scene.xctemplate/"$viewCustom"
cp $router/$routerFile Scene.xctemplate/"$view"
cp $router/$routerFile Scene.xctemplate/"$table"
cp $router/$routerFile Scene.xctemplate/"$collection"
## CustomizableViewType.xctemplate
customizableViewType="CustomizableViewType.xctemplate"
customizableViewTypeFile="CustomizableViewType.*"
customizableViewTypePath="$customizableViewType/$customizableViewTypeFile"
if [ -e "$customizableViewTypePath" ]; then
cp "$customizableViewTypePath" Scene.xctemplate/"$viewCustom"
fi