3 ms·
I think puppet in this case is overkill. I simple bash script with a small function to check if it already exists and what not would do just fine and you don't
by zerosanity 15y ago
I think puppet in this case is overkill. I simple bash script with a small function to check if it already exists and what not would do just fine and you don't have to install another application (puppet).
- aonic 15y agoI agree that its overkill for the use case mentioned in the article, a Makefile would be more than sufficient. I do the same for my vim configuration using `make`: https://github.com/aonic/vim-settings/blob/master/Makefile https://github.com/aonic/vim-settings/blob/master/Makefile Usage: git clone https://github.com/aonic/vim-settings.git cd vim-settings make Remove: make clean
- jlogsdon 15y agoNice method, but with a bash script you wouldn't have to manually add any new files to your Makefile. I use this one: https://gist.github.com/975295 https://gist.github.com/975295. Also handles forcibly linking a file if it exists already (with the -f flag). Of course, you're just using it for one folder so it's not an issue for you ;)
- bostonvaulter2 15y agoYeah I can see how this could be overkill. I initially started by writing my own script but I made that script more complicated than necessary (trying to handle removing files and such). So the end result was that I didn't trust the script with my files. Perhaps there's room for a simple puppet-style configuration manager that lives in just a single script, in some ways similar to sqllite.
- tednaleid 15y agoAgreed, I use a relatively simple shell script to link all of my files in a "home" directory in dropbox to my real home directory on multiple machines: #named link.sh, greps out some common things we don't want to link, also have vim stuff in a different dotfiles repo cd $(dirname $0) for F in $(ls -a1 | grep -v link.sh | egrep -v "^..?$" | grep -v .DS_Store | egrep -v ".hg(ignore)?$" | egrep -v "^vim$"); do if [ -a $HOME/$F ]; then echo "**** Found existing $F, skipping..." elif [ -h $HOME/$F ]; then echo "Already symlinked $F, skipping..." else echo "Linking $F" ln -s $PWD/$F $HOME/$F fi done
- bostonvaulter2 15y agoThis would be a little hard for me because I like to keep my system configuration files in the same repository (such as fstab and php), although I could setup some standard naming scheme like root.etc.fstab to link to /etc/fstab
- jlogsdon 15y agoIf you were going to categorize like that why not just use an etc/ and home/ folder inside your repo?