Skip to content

Commit

Permalink
Make BINLOCATION configurable in get.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Sep 25, 2024
1 parent 33539a0 commit 3b0565f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions cmd/system/caddy.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ func MakeInstallCaddyServer() *cobra.Command {

arch, osVer := env.GetClientArch()

if cmd.Flags().Changed("os") {
osVer, _ = cmd.Flags().GetString("os")
}
if cmd.Flags().Changed("arch") {
arch, _ = cmd.Flags().GetString("arch")
}

if strings.ToLower(osVer) != "linux" {
return fmt.Errorf("this app only supports Linux")
}
Expand Down
6 changes: 5 additions & 1 deletion get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ export VERIFY_CHECKSUM=0
export ALIAS_NAME="ark"
export OWNER=alexellis
export REPO=arkade
export BINLOCATION="/usr/local/bin"

if [ -z "$BINLOCATION" ]; then
BINLOCATION="/usr/local/bin"
fi

export SUCCESS_CMD="$BINLOCATION/$REPO version"

###############################
Expand Down

0 comments on commit 3b0565f

Please sign in to comment.