diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-06-19 22:18:03 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-06-19 22:18:03 -0300 |
commit | 264544a62676f83eb887256706b533efb7216995 (patch) | |
tree | eac3c178915307b1ae18e9814f208aefaaab8325 /inception | |
parent | de424c27ccee8383c490e08b667cca27d2bbed7e (diff) | |
download | apps-264544a62676f83eb887256706b533efb7216995.tar.gz apps-264544a62676f83eb887256706b533efb7216995.tar.bz2 |
Two-stage inception
Diffstat (limited to 'inception')
-rwxr-xr-x | inception | 51 |
1 files changed, 35 insertions, 16 deletions
@@ -7,19 +7,38 @@ BASENAME="`basename $0`" DIRNAME="`dirname $0`" -# Setup -( - cd $DIRNAME - - echo "Initializing submodules..." - git submodule update --init - - echo "Cloning default dotfiles..." - ./metadot/metadot clone default - - echo "Loading all dotfiles..." - ./metadot/metadot load --all -) - -# Teardown -echo "Done. Logout and login again to apply all changes." +# Main +if [ -z "$1" ] || [ "$1" == "init" ]; then + ( + cd $DIRNAME + + echo "Initializing submodules..." + git submodule update --init + + echo "Cloning default dotfiles..." + ./metadot/metadot clone default + + echo "Checking latest tag..." + cd $HOME/.dotfiles + $DIRNAME/utils-git/git-check-tag + + echo "Checking out the latest tag..." + $DIRNAME/utils-git/git-checkout-tag + + echo "Checking dotfiles..." + ./metadot/metadot version + + echo "" + echo "Please manually verify dotfiles version and tag from the above output." + echo "If everything is fine, proceed running this command again with the 'load' parameter." + ) +elif [ "$1" == "load" ]; then + ( + cd $DIRNAME + + echo "Loading all dotfiles..." + ./metadot/metadot load --all + ) + + echo "Done. Logout and login again to apply all changes." +fi |