bugfix(misc): fix kind, gprox, myip, pandoc
[webi-installers/.git] / gprox / install.sh
1 #!/bin/bash
2 set -e
3 set -u
4
5 function __init_gprox() {
6
7     ##################
8     # Install gprox #
9     ##################
10
11     # Every package should define these 6 variables
12     pkg_cmd_name="gprox"
13
14     pkg_dst_cmd="$HOME/.local/bin/gprox"
15     pkg_dst="$pkg_dst_cmd"
16
17     pkg_src_cmd="$HOME/.local/opt/gprox-v$WEBI_VERSION/bin/gprox"
18     pkg_src_dir="$HOME/.local/opt/gprox-v$WEBI_VERSION"
19     pkg_src="$pkg_src_cmd"
20
21     WEBI_SINGLE=true
22
23     # pkg_get_current_version is recommended, but (soon) not required
24     pkg_get_current_version() {
25         # 'gprox --version' has output in this format:
26         #       gprox 0.99.9 (rev abcdef0123)
27         # This trims it down to just the version number:
28         #       0.99.9
29         gprox --version 2> /dev/null |
30             head -n 1 |
31             cut -d ' ' -f 2
32     }
33 }
34
35 __init_gprox