9 # Every package should define these 6 variables
12 pkg_dst_cmd="$HOME/.local/bin/pandoc"
13 pkg_dst="$pkg_dst_cmd"
15 pkg_src_cmd="$HOME/.local/opt/pandoc-v$WEBI_VERSION/bin/pandoc"
16 pkg_src_dir="$HOME/.local/opt/pandoc-v$WEBI_VERSION"
17 pkg_src="$pkg_src_cmd"
19 # pkg_install must be defined by every package
21 # ~/.local/opt/pandoc-v2.10.1/bin
22 mkdir -p "$(dirname $pkg_src_cmd)"
24 # mv ./pandoc-*/pandoc ~/.local/opt/pandoc-v2.10.1/bin/pandoc
25 mv ./pandoc-*/bin/pandoc "$pkg_src_cmd"
28 # pkg_get_current_version is recommended, but (soon) not required
29 pkg_get_current_version() {
30 # 'pandoc --version' has output in this format:
32 # Compiled with pandoc-types 1.21, texmath 0.12.0.3, skylighting 0.8.5
33 # Default user data directory: /home/sergi/.local/share/pandoc or /home/sergi/.pandoc
34 # Copyright (C) 2006-2020 John MacFarlane
35 # Web: https://pandoc.org
36 # This is free software; see the source for copying conditions.
37 # There is no warranty, not even for merchantability or fitness
38 # for a particular purpose.
39 # This trims it down to just the version number:
41 echo $(pandoc --version 2> /dev/null | head -n 1 | cut -d ' ' -f 2)