mirror of
https://github.com/luxfi/cli.git
synced 2026-10-30 17:01:20 +00:00
38 lines
823 B
Go
38 lines
823 B
Go
// Copyright (C) 2022-2025, Lux Industries, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package binutils
|
|
|
|
import (
|
|
"github.com/luxfi/cli/pkg/application"
|
|
"github.com/luxfi/constants"
|
|
)
|
|
|
|
const (
|
|
luxdBinPrefix = "luxd-"
|
|
)
|
|
|
|
// SetupLuxgo downloads and installs the Lux node binary.
|
|
func SetupLuxgo(app *application.Lux, luxdVersion string) (string, error) {
|
|
binDir := app.GetLuxgoBinDir()
|
|
|
|
installer := NewInstaller()
|
|
downloader := NewLuxdDownloader()
|
|
return InstallBinary(
|
|
app,
|
|
luxdVersion,
|
|
binDir,
|
|
binDir,
|
|
luxdBinPrefix,
|
|
constants.LuxOrg,
|
|
constants.LuxdRepoName,
|
|
downloader,
|
|
installer,
|
|
)
|
|
}
|
|
|
|
// SetupLux is an alias for SetupLuxgo for backward compatibility
|
|
func SetupLux(app *application.Lux, luxdVersion string) (string, error) {
|
|
return SetupLuxgo(app, luxdVersion)
|
|
}
|