mirror of
https://github.com/Jguer/yay
synced 2024-10-31 04:12:51 +00:00
Su is now handled. References #39
This commit is contained in:
parent
981387504e
commit
f80e3130ab
3 changed files with 9 additions and 7 deletions
|
@ -18,7 +18,7 @@ import (
|
|||
// BaseURL givers the AUR default address.
|
||||
const BaseURL string = "https://aur.archlinux.org"
|
||||
|
||||
var specialDBsauce bool = false
|
||||
var specialDBsauce = false
|
||||
|
||||
// NarrowSearch searches AUR and narrows based on subarguments
|
||||
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++ {
|
||||
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[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.
|
||||
func List() (aurUp Slice, repoUp Slice, err error) {
|
||||
err = config.PassToPacman("-Sy", nil, nil)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
local, remote, _, remoteNames, err := FilterPackages()
|
||||
if err != nil {
|
||||
|
|
8
yay.go
8
yay.go
|
@ -142,7 +142,13 @@ func main() {
|
|||
}
|
||||
case "-S":
|
||||
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)
|
||||
case "-Si":
|
||||
err = syncInfo(pkgs, options)
|
||||
|
|
Loading…
Reference in a new issue