mirror of
https://github.com/Jguer/yay
synced 2024-09-14 13:51:12 +00:00
Su is now handled. References #39
This commit is contained in:
parent
981387504e
commit
f80e3130ab
|
@ -18,7 +18,7 @@ import (
|
||||||
// BaseURL givers the AUR default address.
|
// BaseURL givers the AUR default address.
|
||||||
const BaseURL string = "https://aur.archlinux.org"
|
const BaseURL string = "https://aur.archlinux.org"
|
||||||
|
|
||||||
var specialDBsauce bool = false
|
var specialDBsauce = false
|
||||||
|
|
||||||
// NarrowSearch searches AUR and narrows based on subarguments
|
// NarrowSearch searches AUR and narrows based on subarguments
|
||||||
func NarrowSearch(pkgS []string, sortS bool) (Query, error) {
|
func NarrowSearch(pkgS []string, sortS bool) (Query, error) {
|
||||||
|
|
|
@ -110,7 +110,7 @@ func Print(start int, u Slice) {
|
||||||
for i := 0; i < len(name); i++ {
|
for i := 0; i < len(name); i++ {
|
||||||
hash = int(name[i]) + ((hash << 5) + (hash))
|
hash = int(name[i]) + ((hash << 5) + (hash))
|
||||||
}
|
}
|
||||||
return (hash)%6 + 31
|
return hash%6 + 31
|
||||||
}
|
}
|
||||||
fmt.Printf("\x1b[33m%-2d\x1b[0m ", len(u)+start-k-1)
|
fmt.Printf("\x1b[33m%-2d\x1b[0m ", len(u)+start-k-1)
|
||||||
fmt.Printf("\x1b[1;%dm%s\x1b[0m/\x1b[1;39m%-25s\t\t\x1b[0m", f(i.Repository), i.Repository, i.Name)
|
fmt.Printf("\x1b[1;%dm%s\x1b[0m/\x1b[1;39m%-25s\t\t\x1b[0m", f(i.Repository), i.Repository, i.Name)
|
||||||
|
@ -130,10 +130,6 @@ func Print(start int, u Slice) {
|
||||||
|
|
||||||
// List returns lists of packages to upgrade from each source.
|
// List returns lists of packages to upgrade from each source.
|
||||||
func List() (aurUp Slice, repoUp Slice, err error) {
|
func List() (aurUp Slice, repoUp Slice, err error) {
|
||||||
err = config.PassToPacman("-Sy", nil, nil)
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
local, remote, _, remoteNames, err := FilterPackages()
|
local, remote, _, remoteNames, err := FilterPackages()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
8
yay.go
8
yay.go
|
@ -142,7 +142,13 @@ func main() {
|
||||||
}
|
}
|
||||||
case "-S":
|
case "-S":
|
||||||
err = install(pkgs, options)
|
err = install(pkgs, options)
|
||||||
case "-Syu", "-Suy":
|
case "-Syu", "-Suy", "-Su":
|
||||||
|
if strings.Contains(op, "y") {
|
||||||
|
err = config.PassToPacman("-Sy", nil, nil)
|
||||||
|
if err != nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
err = upgradePkgs(options)
|
err = upgradePkgs(options)
|
||||||
case "-Si":
|
case "-Si":
|
||||||
err = syncInfo(pkgs, options)
|
err = syncInfo(pkgs, options)
|
||||||
|
|
Loading…
Reference in a new issue