-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall
More file actions
executable file
·26 lines (21 loc) · 852 Bytes
/
install
File metadata and controls
executable file
·26 lines (21 loc) · 852 Bytes
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
#!/bin/bash
repository=$1
name=$2
env=${3:-"dev"}
repository_name=`echo $repository | awk 'BEGIN{FS = "/"}{print $2}' | sed -e 's/\.git.*//'`
module_name=`echo $repository_name | sed -r 's/(^|_)(.)/\U\2\E/g'`
application_name=`echo $repository_name | sed -r 's/-/_/g'`
git clone $repository "./apps/$application_name"
cd ./apps/$application_name/
yarn install
brunch build --production
cd ../../
sed '$d' ./config/themes.exs > ./config/themes.exs
echo "theme $module_name," >> ./config/themes.exs
echo " name: \"$name\"," >> ./config/themes.exs
echo " path: \"apps/$application_name/\"," >> ./config/themes.exs
echo " host: \"host.js\"," >> ./config/themes.exs
echo " participant: \"participant.js\"," >> ./config/themes.exs
echo " tags: []" >> ./config/themes.exs
echo "" >> ./config/themes.exs
echo "register_themes" >> ./config/themes.exs