diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-02-01 01:32:03 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-02-01 01:32:03 -0200 |
commit | 6c5e43233130d8b12704f126ca80ceb7e226b5e2 (patch) | |
tree | 28754bdc0f0f162b9397991e70b6adccca44bc2e | |
parent | 6c4cf690242881f9e6c4931fbb16df064957a8b8 (diff) | |
download | dotfiles-6c5e43233130d8b12704f126ca80ceb7e226b5e2.tar.gz dotfiles-6c5e43233130d8b12704f126ca80ceb7e226b5e2.tar.bz2 |
Adding --all option to metadot load
-rwxr-xr-x | metadot | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -66,9 +66,6 @@ function metadot_load { ln -s $MODULES/$module/$file $HOME/$dirname/$destname done - - echo "Backups saved at $BACKUPS." - else echo "No such module $module" fi @@ -82,5 +79,19 @@ elif [ "$OPT" == "update" ]; then ( cd $DOT && git pull origin master && git submodule update --init ) elif [ "$OPT" == "load" ]; then shift - metadot_load $* + + if [ -z "$1" ]; then + echo "usage: $BASENAME load [module(s)|--all]" + fi + + if [ "$1" == "--all" ]; then + modules="`ls $MODULES`" + else + modules="$*" + fi + + for module in $modules; do + metadot_load $module + done + echo "Backups saved at $BACKUPS." fi |