11 # Every package should define these 6 variables
14 pkg_dst_cmd="$HOME/.local/bin/lf"
15 pkg_dst="$pkg_dst_cmd"
17 pkg_src_cmd="$HOME/.local/opt/lf-v$WEBI_VERSION/bin/lf"
18 pkg_src_dir="$HOME/.local/opt/lf-v$WEBI_VERSION"
19 pkg_src="$pkg_src_cmd"
21 # pkg_install must be defined by every package
23 # ~/.local/opt/lf-v0.99.9/bin
24 mkdir -p "$(dirname $pkg_src_cmd)"
26 # mv ./lf-*/lf ~/.local/opt/lf-v0.99.9/bin/lf
27 mv ./lf-*/lf "$pkg_src_cmd"
30 # pkg_get_current_version is recommended, but (soon) not required
31 pkg_get_current_version() {
32 # 'lf --version' has output in this format:
33 # lf 0.99.9 (rev abcdef0123)
34 # This trims it down to just the version number:
36 echo $(lf --version 2>/dev/null | head -n 1 | cut -d ' ' -f 2)