Bug fixes and added pre_update.sh pacakge scripts #7
12
main.go
12
main.go
@ -273,8 +273,7 @@ func resolveCommand() {
|
||||
|
||||
if installedInfo == nil {
|
||||
fmt.Printf("%s: %s (Install) %s\n", pkgInfo.Name, pkgInfo.GetFullVersion(), sourceInfo)
|
||||
}
|
||||
|
||||
} else {
|
||||
comparison := utils.ComparePackageVersions(*pkgInfo, *installedInfo)
|
||||
if comparison < 0 {
|
||||
fmt.Printf("%s: %s -> %s (Downgrade) %s\n", pkgInfo.Name, installedInfo.GetFullVersion(), pkgInfo.GetFullVersion(), sourceInfo)
|
||||
@ -284,6 +283,7 @@ func resolveCommand() {
|
||||
fmt.Printf("%s: %s (Reinstall) %s\n", pkgInfo.Name, pkgInfo.GetFullVersion(), sourceInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
if rootDir != "/" {
|
||||
fmt.Println("Warning: Operating in " + rootDir)
|
||||
}
|
||||
@ -386,8 +386,7 @@ func resolveCommand() {
|
||||
installedInfo := utils.GetPackageInfo(pkg, rootDir, true)
|
||||
if installedInfo == nil {
|
||||
log.Fatalf("Error: could not get package info for (%s)\n", pkg)
|
||||
}
|
||||
|
||||
} else {
|
||||
comparison := utils.ComparePackageVersions(*entry.Info, *installedInfo)
|
||||
if comparison > 0 {
|
||||
toUpdate.Set(entry.Info.Name, &struct {
|
||||
@ -401,6 +400,7 @@ func resolveCommand() {
|
||||
}{isDependency: false, entry: entry})
|
||||
}
|
||||
}
|
||||
}
|
||||
if toUpdate.Len() == 0 {
|
||||
fmt.Println("All packages are up to date!")
|
||||
os.Exit(0)
|
||||
@ -445,8 +445,7 @@ func resolveCommand() {
|
||||
if installedInfo == nil {
|
||||
fmt.Printf("%s: %s (Install) %s\n", value.entry.Info.Name, value.entry.Info.GetFullVersion(), sourceInfo)
|
||||
continue
|
||||
}
|
||||
|
||||
} else {
|
||||
comparison := utils.ComparePackageVersions(*value.entry.Info, *installedInfo)
|
||||
if comparison > 0 {
|
||||
fmt.Printf("%s: %s -> %s (Upgrade) %s\n", value.entry.Info.Name, installedInfo.GetFullVersion(), value.entry.Info.GetFullVersion(), sourceInfo)
|
||||
@ -454,6 +453,7 @@ func resolveCommand() {
|
||||
fmt.Printf("%s: %s -> %s (Reinstall) %s\n", value.entry.Info.Name, installedInfo.GetFullVersion(), value.entry.Info.GetFullVersion(), sourceInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update confirmation prompt
|
||||
if !yesAll {
|
||||
|
Loading…
x
Reference in New Issue
Block a user