3 function __init_sclient() {
11 # Every package should define these 6 variables
12 pkg_cmd_name="sclient"
14 pkg_dst_cmd="$HOME/.local/bin/sclient"
15 pkg_dst="$pkg_dst_cmd"
17 pkg_src_cmd="$HOME/.local/opt/sclient-v$WEBI_VERSION/bin/sclient"
18 pkg_src_dir="$HOME/.local/opt/sclient-v$WEBI_VERSION"
19 pkg_src="$pkg_src_cmd"
22 # $HOME/.local/opt/sclient-v1.3.3/bin
23 mkdir -p "$pkg_src_bin"
25 # mv ./sclient* "$HOME/.local/opt/sclient-v1.3.3/bin/sclient"
26 mv ./"$pkg_cmd_name"* "$pkg_src_cmd"
28 # chmod a+x "$HOME/.local/opt/sclient-v1.3.3/bin/sclient"
29 chmod a+x "$pkg_src_cmd"
32 pkg_get_current_version() {
33 # 'sclient version' has output in this format:
34 # sclient 1.3.3 (455db50) 2020-12-02T22:05:35Z
35 # This trims it down to just the version number:
37 echo "$(sclient --version 2> /dev/null | head -n 1 | cut -d' ' -f2 | sed 's:^v::')"