-
Notifications
You must be signed in to change notification settings - Fork 1
/
sync-from-dev
executable file
·47 lines (40 loc) · 2.96 KB
/
sync-from-dev
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
#!/usr/bin/env bash
DEVROOT='../caribou-development'
TEMPLATE_ROOT='src/leiningen/new/caribou'
rsync -av --safe-links --exclude target --exclude app/assets $DEVROOT/.gitignore $DEVROOT/app $DEVROOT/src $DEVROOT/project.clj $DEVROOT/Procfile $TEMPLATE_ROOT
rsync -av --safe-links --exclude public/js/app $DEVROOT/resources/ $TEMPLATE_ROOT/resources
rsync -av $TEMPLATE_ROOT/resources/ resources
for CONFIGFILE in production staging development test heroku
do
sed -i '' 's/caribou_/{{sanitized}}_/g' $TEMPLATE_ROOT/resources/config/$CONFIGFILE.clj
# sed -i '' 's/skel.controllers/{{name}}.controllers/g' $TEMPLATE_ROOT/resources/config/$CONFIGFILE.clj
# sed -i '' 's/skel.hooks/{{name}}.hooks/g' $TEMPLATE_ROOT/resources/config/$CONFIGFILE.clj
# sed -i '' 's/skel.fields/{{name}}.fields/g' $TEMPLATE_ROOT/resources/config/$CONFIGFILE.clj
sed -i '' 's/skel/{{name}}/g' $TEMPLATE_ROOT/resources/config/$CONFIGFILE.clj
done
sed -i '' 's/skel.hooks.model/{{name}}.hooks.model/g' $TEMPLATE_ROOT/src/skel/hooks/model.clj
sed -i '' 's/skel.migrations.default/{{name}}.migrations.default/g' $TEMPLATE_ROOT/src/skel/migrations/default.clj
sed -i '' 's/skel.migrations.admin/{{name}}.migrations.admin/g' $TEMPLATE_ROOT/src/skel/migrations/admin.clj
sed -i '' 's/skel.migrations.order/{{name}}.migrations.order/g' $TEMPLATE_ROOT/src/skel/migrations/order.clj
sed -i '' 's/skel.controllers/{{name}}.controllers/g' $TEMPLATE_ROOT/src/skel/controllers/home.clj
sed -i '' 's/skel/{{name}}/g' $TEMPLATE_ROOT/src/skel/boot.clj
sed -i '' 's/skel.helpers/{{name}}.helpers/g' $TEMPLATE_ROOT/src/skel/helpers.clj
sed -i '' 's/skel.routes/{{name}}.routes/g' $TEMPLATE_ROOT/src/skel/routes.clj
sed -i '' 's/skel/{{name}}/g' $TEMPLATE_ROOT/src/skel/core.clj
# sed -i '' 's/skel.boot/{{name}}.boot/g' $TEMPLATE_ROOT/src/skel/core.clj
# sed -i '' 's/skel.helpers/{{name}}.helpers/g' $TEMPLATE_ROOT/src/skel/core.clj
# sed -i '' 's/skel.routes/{{name}}.routes/g' $TEMPLATE_ROOT/src/skel/core.clj
# sed -i '' 's/skel.core/{{name}}.core/g' $TEMPLATE_ROOT/src/skel/core.clj
sed -i '' 's/REPLACEMEWITHAREALSESSIONCOOKIE!/{{session-key}}/g' $TEMPLATE_ROOT/src/skel/core.clj
sed -i '' 's/caribou-development/{{name}}/g' $TEMPLATE_ROOT/project.clj
# sed -i '' 's/caribou-development/{{name}}/g' $TEMPLATE_ROOT/project.clj
# sed -i '' 's/caribou-development-frontend/{{name}}-frontend/g' $TEMPLATE_ROOT/project.clj
sed -i '' 's/skel/{{name}}/g' $TEMPLATE_ROOT/project.clj
# sed -i '' 's/skel.core/{{name}}.core/g' $TEMPLATE_ROOT/project.clj
# sed -i '' 's/skel.migrations/{{name}}.migrations/g' $TEMPLATE_ROOT/project.clj
# sed -i '' 's/skel.immutant/{{name}}.immutant/g' $TEMPLATE_ROOT/project.clj
# sed -i '' 's/skel.js/{{name}}.js/g' $TEMPLATE_ROOT/project.clj
sed -i '' 's/skel/{{name}}/g' $TEMPLATE_ROOT/Procfile
sed -i '' 's/skel/{{name}}/g' $TEMPLATE_ROOT/resources/templates/home.html
sed -i '' 's/skel/{{name}}/g' $TEMPLATE_ROOT/resources/cljs/skel/core.cljs
sed -i '' 's/skel/{{name}}/g' $TEMPLATE_ROOT/resources/cljs/skel/connect.cljs