summaryrefslogtreecommitdiffstats
path: root/assets/create.sh
blob: d95ffa31ee25489b2a684698b6f9384c538099aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
set -euo pipefail

ASSET_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# Ensure submodules are initialized.
git submodule init
git submodule update

# Always remove the local cache to avoid any confusion
bat cache --clear

# TODO: Remove this (and the reverse part below) when
# https://github.com/trishume/syntect/issues/222 has been fixed
JAVADOC_FILE="${ASSET_DIR}/syntaxes/Packages/Java/JavaDoc.sublime-syntax"
JAVADOC_PATCH="${ASSET_DIR}/JavaDoc.sublime-syntax.patch"
patch "$JAVADOC_FILE" "$JAVADOC_PATCH"

bat cache --build --blank --source="$ASSET_DIR" --target="$ASSET_DIR"

patch -R "$JAVADOC_FILE" "$JAVADOC_PATCH"