-
Notifications
You must be signed in to change notification settings - Fork 724
/
Copy pathchange-theme.sh
53 lines (46 loc) · 1.98 KB
/
change-theme.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
49
50
51
52
53
#!/usr/bin/env bash
if [ ! -n "$THEME_NAME" ]
then
echo "You need define the THEME_NAME variable"
exit
fi
echo "Configuring app to $THEME_NAME theme"
replace_a_file()
{
SOURCE_DIR=$1
DESTANATION_DIR=$2
FILE_NAME=$3
if [ -f "$SOURCE_DIR/$FILE_NAME" ]
then
cp $SOURCE_DIR/$FILE_NAME $DESTANATION_DIR/$FILE_NAME
echo "Replaced $FILE_NAME"
else
echo "No $FILE_NAME found!"
fi
}
THEME_DIR=src/themes/$THEME_NAME
replace_a_file $THEME_DIR src/styles colors.js
replace_a_file $THEME_DIR assets/images background.png
replace_a_file $THEME_DIR assets/images topBarBg.png
replace_a_file $THEME_DIR/tabbar assets/images/tabbar home.png
replace_a_file $THEME_DIR/tabbar assets/images/tabbar [email protected]
replace_a_file $THEME_DIR/tabbar assets/images/tabbar [email protected]
replace_a_file $THEME_DIR/tabbar assets/images/tabbar grids.png
replace_a_file $THEME_DIR/tabbar assets/images/tabbar [email protected]
replace_a_file $THEME_DIR/tabbar assets/images/tabbar [email protected]
replace_a_file $THEME_DIR/tabbar assets/images/tabbar pages.png
replace_a_file $THEME_DIR/tabbar assets/images/tabbar [email protected]
replace_a_file $THEME_DIR/tabbar assets/images/tabbar [email protected]
replace_a_file $THEME_DIR/tabbar assets/images/tabbar components.png
replace_a_file $THEME_DIR/tabbar assets/images/tabbar [email protected]
replace_a_file $THEME_DIR/tabbar assets/images/tabbar [email protected]
replace_a_file $THEME_DIR/tabbar assets/images/tabbar calendar.png
replace_a_file $THEME_DIR/tabbar assets/images/tabbar [email protected]
replace_a_file $THEME_DIR/tabbar assets/images/tabbar [email protected]
replace_a_file $THEME_DIR src/modules/auth AuthView.js
replace_a_file $THEME_DIR src/modules/home HomeView.js
replace_a_file $THEME_DIR src/modules/grids GridsView.js
replace_a_file $THEME_DIR src/modules/calendar CalendarView.js
replace_a_file $THEME_DIR src/modules/components ComponentsView.js
replace_a_file $THEME_DIR src/modules/navigation MainTabNavigator.js
replace_a_file $THEME_DIR src/modules/pages PagesView.js