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