Skip to content

Commit

Permalink
Merge branch 'master' of github.com:donomii/portprog
Browse files Browse the repository at this point in the history
  • Loading branch information
donomii committed Nov 13, 2022
2 parents a405b03 + b0c9077 commit 5f527d8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 29 deletions.
8 changes: 0 additions & 8 deletions packages-windows/dcss-git.json

This file was deleted.

9 changes: 0 additions & 9 deletions packages-windows/go-1.10.3.json

This file was deleted.

19 changes: 7 additions & 12 deletions updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,19 +252,13 @@ func makeOpt(optName, optVal string) string {
}

func unTar(b Config, zipPath string) {
p2 := strings.Replace(zipPath, ".gz", "", -1)
p2 = strings.Replace(zipPath, ".tgz", ".tar", -1)
p2 = strings.Replace(p2, ".lzma", "", -1)
p2 = strings.Replace(p2, ".bz2", "", -1)
splits := strings.Split(p2, "/")
zipPath = strings.ReplaceAll(zipPath, "\\", "/")
splits := strings.Split(zipPath, "/")
fname := splits[len(splits)-1]
if _, err := os.Stat(zipPath); err == nil {
if isWindows() {
unSevenZ(b, zipPath)
} else {
doCommand("tar", []string{"-xzvf", zipPath})
doCommand("tar", []string{"-xjvf", zipPath})
}
unSevenZ(b, zipPath)
doCommand("tar", []string{"-xzvf", zipPath, "--force-local"})
doCommand("tar", []string{"-xjvf", zipPath, "--force-local"})
} else {
log.Println("Could not find ", fname)
}
Expand All @@ -280,7 +274,8 @@ func unTgzLib(b Config, zipPath string) {

//unSevenZ(b, fname)
} else {
doCommand("tar", []string{"-xzvf", zipPath})
doCommand("tar", []string{"-xzvf", zipPath, "--force-local"})
doCommand("tar", []string{"-xjvf", zipPath, "--force-local"})
}
} else {
log.Println("Could not extract ", fname)
Expand Down

0 comments on commit 5f527d8

Please sign in to comment.