#Putting config file in separate directory

13 messages · Page 1 of 1 (latest)

marble valve
#

I want to put the binary file into /usr/bin , and I don't really want to put my config file in there. Is there a way to put the config file into ~/.config/deej?
P.s.:I have already tried modifying the config.go file in deej/pkg/deej, but it looks like if I want to build the app from the .sh script or build directly the main.go file, it doesn't check the source files, it just downloads them.

#

Putting config file in separate directory

odd locust
marble valve
#

here is my main.go file in /pkg/deej/cmd. It doesn't look like it includes all the .go files in the previous directory. And by "just downloading them" I was referring to this part:

    "flag"
    "fmt"

    "github.com/omriharel/deej/pkg/deej""```
odd locust
#

i don't know what that really means or how it works but it will build the source you have or my deej wouldn't work (custom code needed)

marble valve
#

did you just build with the provided .sh file, or did you modify it?

odd locust
#

i use a modfied version of deej using usb-midi instead of serial to transfer data

#

although i can't take too much credit for the go code, had great help with that

marble valve
#

as it turns out

#

it did build with the config.go file in mind, but it is still trying to read from the directory from which I'm running deej from.

marble valve
#

I just ended up with a .sh file which cd-s into the config's directory. I was trying to avoid such a file, but here we are I guess

odd locust
#

did you change userConfigPath = "." ?

#

and did you make sure to use the newly compiled binary, not the one you moved?