Browse Source

download: fetch all suggested APKs

This command is mostly useful when user does not have the device at the
moment. In this case we cannot make any assumptions about it.
pull/8/head
relan 10 years ago
parent
commit
e48634ba6a
  1. 12
      cmd/fdroidcl/download.go

12
cmd/fdroidcl/download.go

@ -26,12 +26,14 @@ func runDownload(args []string) {
}
apps := findApps(args)
for _, app := range apps {
apk := app.CurApk()
if apk == nil {
log.Fatalf("No current apk found for %s", app.ID)
apks := app.SuggestedApks()
if len(apks) == 0 {
log.Fatalf("No suggested APKs found for %s", app.ID)
}
for _, apk := range apks {
path := downloadApk(&apk)
fmt.Printf("APK available in %s\n", path)
}
path := downloadApk(apk)
fmt.Printf("APK available in %s\n", path)
}
}

Loading…
Cancel
Save