#!/bin/bash # # The inception. # # Parameters BASENAME="`basename $0`" DIRNAME="`dirname $0`" # 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