DEV Community

Discussion on: Source or Symlink or Other?

Collapse
 
flrnd profile image
Florian Rand

First of all, welcome to the command line addicts club! I'd never thought using dropbox for that, I must say it's not a bad idea!

Although it's very common to use GitHub / Gitlab / Bitbucket (your preferred git platform here) to store your dotfiles (and shell scripts). With git you can achieve the sync problem. Now about running your scripts, I'd advice creating a bin/ directory inside your home and symlinking your scripts there to call them like every other program, ln -s /route/to/your/script $HOME/bin/somecoolscript.sh.

I have a .dotfiles directory on my home that I sync with github, then link files from this directory to their respective place.

I did a fast search and this article may be of help. If you have any doubts just ask!

Collapse
 
cookrdan profile image
Dan

Florian thank you! Yes I tend to keep a lot of things in dropbox/icloud - makes a new setup go quite fast.

I have had this spinning around in my head now since I posted this, and I believe what I will do is symlink them. I need to organize it in a slightly different way. I have seen so many ways people do this stuff and it doesn’t seem to matter but having a very organized way will be better in the long term. The author of the article also uses source for functions and aliases which is interesting. That made me feel like I’m not so far out to lunch.

I guess my big problem was that I wasn’t able to anticipate what I needed in the beginning and now that I’ve jumped in with both feet I need to change it. Fortunately I don’t have too much to change.

When I started I also didn’t know git very well and so I have spent a lot of time learning git and I need to also apply that to my setup.

I appreciate the link and your thoughts, thank you!

Collapse
 
flrnd profile image
Florian Rand

Anytime! I guess there is no defined or perfect way around it. If it works for you then I say go for it!