Skip to content
Permalink
Browse files

Add support for autoupdating files not put on the SD card.

  • Loading branch information
noahc3 committed Mar 17, 2020
1 parent dd8b0da commit 0b4ab0852f0896773f049cd3ce62d7739cd69862
Showing with 3 additions and 2 deletions.
  1. +1 −0 SDSetupCommon/Types.cs
  2. +2 −2 SDSetupUpdater/Program.cs
@@ -208,6 +208,7 @@ public class Package {

public AutoUpdateType AutoUpdateType = AutoUpdateType.None;
public string AutoUpdateHint = "";
public string AutoUpdatePathOverride = "";

public Package() {

@@ -235,7 +235,7 @@ class Program {
Log($"Detected {OutdatedPackagesLibGet.Count} outdated libget packages. Updating...");

foreach (string k in OutdatedPackagesLibGet) {
string packageFilesDirectory = Path.Join(nPackagesetDirectory, k, "latest", "sd");
string packageFilesDirectory = Path.Join(nPackagesetDirectory, k, "latest", String.IsNullOrWhiteSpace(SDPackages[k].AutoUpdatePathOverride) ? "sd" : SDPackages[k].AutoUpdatePathOverride);
Directory.Delete(packageFilesDirectory, true);
Directory.CreateDirectory(packageFilesDirectory);
repo.DownloadPackageToDisk(SDPackages[k].AutoUpdateHint, packageFilesDirectory, true);
@@ -262,7 +262,7 @@ class Program {

foreach (string k in OutdatedPackagesKosmos.Keys) {
string kosmosAutoPackageDirectory = Path.Join(new FileInfo(config.KosmosUpdaterScriptPath).Directory.FullName, "out", SDPackages[k].AutoUpdateHint);
string packageFilesDirectory = Path.Join(nPackagesetDirectory, k, "latest", "sd");
string packageFilesDirectory = Path.Join(nPackagesetDirectory, k, "latest", String.IsNullOrWhiteSpace(SDPackages[k].AutoUpdatePathOverride) ? "sd" : SDPackages[k].AutoUpdatePathOverride);

Directory.Delete(packageFilesDirectory, true);
U.DirectoryCopy(kosmosAutoPackageDirectory, packageFilesDirectory, true);

0 comments on commit 0b4ab08

Please sign in to comment.
You can’t perform that action at this time.