File indexing completed on 2025-01-05 05:19:56
0001 #!/usr/bin/env bash 0002 # This script uses pandoc to update the local README.md file with the content from Kate's docbook documentation. 0003 0004 cd $(dirname "$(readlink -f "$BASH_SOURCE")") 0005 0006 sed -n '/^<sect1 id="kate-application-plugin-keyboardmacros">$/,/^<\/sect1>$/p' ../../doc/kate/plugins.docbook | \ 0007 pandoc -f docbook -t markdown -s - -o - | \ 0008 sed 's/{.\(menuchoice\|keycombo\)}//;s/\s{#.\+}$//' | \ 0009 sed 's/CTRL/Ctrl+/;s/SHIFT/Shift+/;s/ALT/Alt+/;s/++/+/g;s/(\[/[`/;s/\])/`]/' | \ 0010 cat > README.md 0011 0012 cd - >/dev/null 0013 0014 ##### BEGIN git pre-commit hook script 0015 ### 0016 ### #!/usr/bin/env bash 0017 ### 0018 ### UPDATE_SCRIPT="$(dirname $(git rev-parse --git-common-dir))"/addons/keyboardmacros/update-README.md.sh 0019 ### 0020 ### test -f "$UPDATE_SCRIPT" || exit 0 0021 ### 0022 ### TMP=$(mktemp) 0023 ### README="$(dirname $(git rev-parse --git-common-dir))"/addons/keyboardmacros/README.md 0024 ### cp "$README" "$TMP" 0025 ### source "$UPDATE_SCRIPT" 0026 ### 0027 ### if ! diff -q "$README" "$TMP" &>/dev/null; then 0028 ### echo "Warning: README.md has been updated!" 0029 ### rm "$TMP" 0030 ### exit 1 0031 ### fi 0032 ### rm "$TMP" 0033 ### exit 0 0034 ### 0035 ##### END