Compare commits

...

3 Commits

Author SHA1 Message Date
8cc5a9e3ed missed commits 2024-02-12 13:36:29 +01:00
d2bcd7b505 fix #80: using os.MkdirAll():
Recursively create ad dir including output dir. The output dir itself
is not being created separately anymore. That way, no directory will
be created if no ads could be downloaded.
2024-02-12 13:32:25 +01:00
c59c2e2931 fix #81: add arm64 build support 2024-02-12 13:32:25 +01:00
4 changed files with 8 additions and 8 deletions

View File

@@ -34,7 +34,7 @@ import (
)
const (
VERSION string = "0.3.4"
VERSION string = "0.3.5"
Baseuri string = "https://www.kleinanzeigen.de"
Listuri string = "/s-bestandsliste.html"
Defaultdir string = "."

View File

@@ -116,11 +116,6 @@ func Main(output io.Writer) int {
if err != nil {
return Die(err)
}
err = Mkdir(outdir)
if err != nil {
return Die(err)
}
conf.Outdir = outdir
// used for all HTTP requests

View File

@@ -22,7 +22,12 @@ freebsd/amd64
linux/amd64
netbsd/amd64
openbsd/amd64
windows/amd64"
windows/amd64
freebsd/arm64
linux/arm64
netbsd/arm64
openbsd/arm64
windows/arm64"
tool="$1"
version="$2"

View File

@@ -32,7 +32,7 @@ import (
func Mkdir(dir string) error {
if _, err := os.Stat(dir); errors.Is(err, os.ErrNotExist) {
err := os.Mkdir(dir, os.ModePerm)
err := os.MkdirAll(dir, os.ModePerm)
if err != nil {
return fmt.Errorf("failed to create directory %s: %w", dir, err)
}