bat/assets/create.sh

37 lines
1.0 KiB
Bash
Raw Normal View History

2018-04-30 15:41:30 +02:00
set -e
THEME_FOLDER="$HOME/.config/bat/themes"
SYNTAX_FOLDER="$HOME/.config/bat/syntax"
if [ ! -e "$THEME_FOLDER" ]; then
mkdir -p "$THEME_FOLDER"
(
cd "$THEME_FOLDER"
git clone https://github.com/jonschlinkert/sublime-monokai-extended
ln -s "sublime-monokai-extended/Monokai Extended.tmTheme" Default.tmTheme
)
fi
if [ ! -e "$SYNTAX_FOLDER" ]; then
mkdir -p "$SYNTAX_FOLDER"
(
cd "$SYNTAX_FOLDER"
git clone https://github.com/sublimehq/Packages/
2018-05-06 14:34:10 +02:00
# Patch JavaScript syntax
sed -i -e 's/{{identifier_break}}+/{{identifier_break}}/' Packages/JavaScript/JavaScript.sublime-syntax
# Use extended Markdown syntax
2018-04-30 15:41:30 +02:00
rm -rf Packages/Markdown
git clone https://github.com/jonschlinkert/sublime-markdown-extended
2018-05-06 14:34:10 +02:00
# Add additional sxntax definitions
2018-05-06 14:26:58 +02:00
git clone https://github.com/princemaple/elixir-sublime-syntax/
2018-05-06 14:34:10 +02:00
git clone https://github.com/sharkdp/sublime_toml_highlighting
2018-04-30 15:41:30 +02:00
)
fi
bat init-cache
cp "$HOME/.cache/bat"/* .