diff options
author | Roger Gonzalez <rogergonzalez21@gmail.com> | 2019-12-29 14:58:33 -0300 |
---|---|---|
committer | Roger Gonzalez <rogergonzalez21@gmail.com> | 2019-12-29 14:58:33 -0300 |
commit | efb336a23b65a9a2d56889396b13c1757bdaf354 (patch) | |
tree | 234e40115f79a84c8a755df6fb932cc6797e36e1 /.install-dotfiles.sh |
Initial commit
Diffstat (limited to '.install-dotfiles.sh')
-rw-r--r-- | .install-dotfiles.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.install-dotfiles.sh b/.install-dotfiles.sh new file mode 100644 index 00000000..e69bfc56 --- /dev/null +++ b/.install-dotfiles.sh @@ -0,0 +1,14 @@ +git clone --bare https://git.rogs.me/me/dotfiles.git $HOME/.cfg +function config { + /usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@ +} +mkdir -p .config-backup +config checkout +if [ $? = 0 ]; then + echo "Checked out config."; + else + echo "Backing up pre-existing dot files."; + config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .config-backup/{} +fi; +config checkout +config config status.showUntrackedFiles no |