1
0
mirror of https://github.com/sharkdp/bat.git synced 2024-10-06 02:41:06 +01:00
bat/assets/create.sh

22 lines
649 B
Bash
Raw Normal View History

#!/bin/bash
2019-02-02 10:19:11 +00:00
set -euo pipefail
2018-04-30 14:41:30 +01:00
ASSET_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
2018-04-30 14:41:30 +01:00
# Ensure submodules are initialized.
git submodule init
git submodule update
# Always remove the local cache to avoid any confusion
bat cache --clear
2018-10-04 09:16:53 +01:00
# TODO: Remove this (and the reverse part below) when
2018-11-11 09:14:18 +00:00
# https://github.com/trishume/syntect/issues/222 has been fixed
2018-10-04 09:16:53 +01:00
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"
2018-10-04 09:16:53 +01:00
patch -R "$JAVADOC_FILE" "$JAVADOC_PATCH"