From efb336a23b65a9a2d56889396b13c1757bdaf354 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Sun, 29 Dec 2019 14:58:33 -0300 Subject: Initial commit --- .install-dotfiles.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .install-dotfiles.sh (limited to '.install-dotfiles.sh') 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 -- cgit v1.2.3