Skip to content

Commit

Permalink
fix: fix unix permission denied
Browse files Browse the repository at this point in the history
  • Loading branch information
devenami committed Feb 13, 2023
1 parent fb1f580 commit 0469fa0
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@

# Editor directories and files
.idea
.DS_Store

# build output dir
/bin
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.PHONY: all
all: prepare

.PHONY: prepare
prepare:
@go mod download
@go mod tidy

.PHONY: build
build: ## Build executable binary file
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/linux-amd64/music-get main.go
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o bin/linux-arm64/music-get main.go
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o bin/darwin-amd64/music-get main.go
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o bin/darwin-arm64/music-get main.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o bin/windows-amd64/music-get.exe main.go
CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -o bin/windows-arm64/music-get.exe main.go

.PHONY: help
help: ## Display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
7 changes: 6 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
module github.com/winterssy/music-get

go 1.19

require (
github.com/bogem/id3v2 v1.1.1
gopkg.in/cheggaaa/pb.v1 v1.0.28
)

require (
github.com/fatih/color v1.7.0 // indirect
github.com/mattn/go-colorable v0.1.2 // indirect
github.com/mattn/go-runewidth v0.0.4 // indirect
golang.org/x/sys v0.0.0-20190529085034-854af27f14a7 // indirect
golang.org/x/text v0.3.2 // indirect
gopkg.in/cheggaaa/pb.v1 v1.0.28
)
2 changes: 1 addition & 1 deletion utils/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func ExistsPath(path string) (bool, error) {
func BuildPathIfNotExist(path string) error {
ok, err := ExistsPath(path)
if !ok {
return os.MkdirAll(path, 0644)
return os.MkdirAll(path, 0744)
}
return err
}
Expand Down

0 comments on commit 0469fa0

Please sign in to comment.