Skip to content

Commit 480169b

Browse files
committed
fix(terramate): link both terramate and terramate-ls
1 parent 6251681 commit 480169b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

terramate/install.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,24 @@ __init_terramate() {
1515
pkg_dst="$pkg_dst_cmd"
1616

1717
pkg_src_cmd="$HOME/.local/opt/terramate-v$WEBI_VERSION/bin/terramate"
18+
pkg_src_bin="$HOME/.local/opt/terramate-v$WEBI_VERSION/bin"
1819
pkg_src_dir="$HOME/.local/opt/terramate-v$WEBI_VERSION"
1920
pkg_src="$pkg_src_cmd"
2021

2122
# pkg_install must be defined by every package
2223
pkg_install() {
2324
# ~/.local/opt/terramate-v0.11.4/bin
24-
mkdir -p "$(dirname "$pkg_src_cmd")"
25+
mkdir -p "$pkg_src_bin"
2526

2627
# mv ./terramate* ~/.local/opt/terramate-v0.11.4/bin/terramate
27-
mv terramate* "$pkg_src_cmd"
28+
mv ./terramate "$pkg_src_bin"
29+
mv ./terramate-ls "$pkg_src_bin"
30+
}
31+
32+
# this is an override since we have two binaries to link
33+
pkg_link() {
34+
ln -sf "../opt/terramate-v$WEBI_VERSION/bin/terramate" ~/.local/bin/
35+
ln -sf "../opt/terramate-v$WEBI_VERSION/bin/terramate-ls" ~/.local/bin/
2836
}
2937

3038
# pkg_get_current_version is recommended, but (soon) not required

0 commit comments

Comments
 (0)