-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.sh
executable file
·63 lines (47 loc) · 2.62 KB
/
build.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
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
################################################################################
# Sublime Dark Theme
################################################################################
# Make a copy to use as a base
cp -f "Gray Matter Light.tmTheme" "Gray Matter Base.tmTheme"
# Remove Comments (they cause Atom conversion to fail)
perl -pi -e 's/<!--[^>]*-->//g' Gray\ Matter\ Base.tmTheme
# Make the Dark version
cp -f "Gray Matter Base.tmTheme" Gray\ Matter\ Dark.tmTheme
# Dark version color swaps
perl -pi -e 's/3C3C3C/BEBEBE/g' Gray\ Matter\ Dark.tmTheme
perl -pi -e 's/B9B9B9/616161/g' Gray\ Matter\ Dark.tmTheme
perl -pi -e 's/F5F5F5/1A191A/g' Gray\ Matter\ Dark.tmTheme
perl -pi -e 's/EDEDED/222122/g' Gray\ Matter\ Dark.tmTheme
perl -pi -e 's/C3E8F3/373737/g' Gray\ Matter\ Dark.tmTheme
# Change the internal name
perl -pi -e 's/Gray\ Matter\ Light/Gray\ Matter\ Dark/g' Gray\ Matter\ Dark.tmTheme
rm "Gray Matter Base.tmTheme"
################################################################################
# VSCode Dark Theme
################################################################################
# Make a copy to use as a base
cp -f "Gray Matter Light-color-theme.json" "Gray Matter Base-color-theme.json"
# Make the Dark version
cp -f "Gray Matter Base-color-theme.json" Gray\ Matter\ Dark-color-theme.json
# Dark version color swaps
perl -pi -e 's/3C3C3C/BEBEBE/g' Gray\ Matter\ Dark-color-theme.json
perl -pi -e 's/B9B9B9/616161/g' Gray\ Matter\ Dark-color-theme.json
perl -pi -e 's/F5F5F5/1A191A/g' Gray\ Matter\ Dark-color-theme.json
perl -pi -e 's/EDEDED/222122/g' Gray\ Matter\ Dark-color-theme.json
perl -pi -e 's/C3E8F3/373737/g' Gray\ Matter\ Dark-color-theme.json
# Change the internal name
perl -pi -e 's/Gray\ Matter\ Light/Gray\ Matter\ Dark/g' Gray\ Matter\ Dark-color-theme.json
rm "Gray Matter Base-color-theme.json"
################################################################################
echo "Finished Gray Matter Build"
# Convert light and dark to Atom formats (WIP)
# apm init --theme gray-matter-light-syntax --convert "./Gray Matter Base.tmTheme"
# apm init --theme gray-matter-dark-syntax --convert "./Gray Matter Dark.tmTheme"
# # Copy over metadata just for atom packages
# cp -f "CHANGELOG.md" "./gray-matter-light-syntax/CHANGELOG.md"
# cp -f "CHANGELOG.md" "./gray-matter-dark-syntax/CHANGELOG.md"
# cp -f "README.md" "./gray-matter-light-syntax/README.md"
# cp -f "README.md" "./gray-matter-dark-syntax/README.md"
# cp -R ./gray-matter-light-syntax/ ~/.atom/dev/packages/gray-matter-light-syntax
# cp -R ./gray-matter-dark-syntax/ ~/.atom/dev/packages/gray-matter-dark-syntax