Compare commits

...

3 Commits
v0.0.5 ... main

Author SHA1 Message Date
jolheiser 123857ac73
fix: case insensitive arch
ci/woodpecker/push/goreleaser Pipeline was successful Details
ci/woodpecker/tag/goreleaser Pipeline was successful Details
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-02-21 21:37:31 -06:00
jolheiser e8303793b2
fix: quote path in bash for cross-OS
ci/woodpecker/push/goreleaser Pipeline was successful Details
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-02-02 16:02:13 -06:00
jolheiser ad08d24312
feat: shorthand syntax
ci/woodpecker/push/goreleaser Pipeline was successful Details
ci/woodpecker/tag/goreleaser Pipeline was successful Details
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2023-02-01 21:57:42 -06:00
3 changed files with 12 additions and 3 deletions

View File

@ -12,8 +12,8 @@ import (
var (
amd64Re = regexp.MustCompile(`amd64|x86_64|64-bit|[^mhv]64`)
linuxRe = regexp.MustCompile(`linux`)
windowsRe = regexp.MustCompile(`windows|\Awin`)
linuxRe = regexp.MustCompile(`(?i)linux`)
windowsRe = regexp.MustCompile(`(?i)windows|\Awin`)
installerRe = regexp.MustCompile(`\.deb|\.msi`)
)

View File

@ -14,6 +14,11 @@ import (
var Version = "develop"
func main() {
base := "github.com/"
if b, ok := os.LookupEnv("EGET_BASE"); ok {
base = strings.TrimSuffix(b, "/") + "/"
}
fs := flag.NewFlagSet("eget", flag.ExitOnError)
fs.Usage = func() {
fmt.Fprintln(fs.Output(), "eget <package>")
@ -72,6 +77,10 @@ func main() {
uri = pkg.Repo
}
if strings.Count(uri, "/") == 1 {
uri = base + uri
}
f, err = forge.NewGitea(uri)
if strings.HasPrefix(uri, "github") {
f, err = forge.NewGitHub(uri)

View File

@ -124,7 +124,7 @@ func (m Meta) writeShellEnv(shell string) error {
}
tmpl = fmt.Sprintf("let-env %[1]s = ($env.%[1]s | append %%q)\n", path)
case "sh":
tmpl = "PATH=$PATH:%s\n"
tmpl = "PATH=$PATH:%q\n"
case "ps1":
tmpl = `$env:Path = "$env:Path;%s"` + "\n"
default: