103216541fb38e890c78eb459d43d2542239e0b1
[webi-installers/.git] / gprox / install.sh
1 #!/bin/bash
2
3 function __init_gprox() {
4     set -e
5     set -u
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     # pkg_get_current_version is recommended, but (soon) not required
22     pkg_get_current_version() {
23         # 'gprox --version' has output in this format:
24         #       gprox 0.99.9 (rev abcdef0123)
25         # This trims it down to just the version number:
26         #       0.99.9
27         echo $(gprox --version 2> /dev/null | head -n 1 | cut -d ' ' -f 2)
28     }
29 }
30
31 __init_gprox