From: Jannik ZANDER Date: Tue, 26 Dec 2017 13:58:13 +0000 (+0100) Subject: Fix2 dotfiles-init.sh X-Git-Url: https://git.zndr.dk/?a=commitdiff_plain;h=5e8e5c0456b9d5c099f2644dfcbe1514251db5bc;p=dotfiles.git Fix2 dotfiles-init.sh --- diff --git a/README.md b/README.md index 044eda8..6f00e22 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ # dotfiles -Download init script: +Download and execute the dotfiles-init.sh file: - $ git archive --remote=git@bitbucket.org:jannikz/dotfiles.git HEAD dotfiles-init.sh + $ git archive --remote=git@bitbucket.org:jannikz/dotfiles.git HEAD bin/dotfiles-init.sh | tar -x + $ dotfiles-init.sh + $ rm dotfiles-init.sh -Execute it: - - $ ./dotfiles-init.sh diff --git a/bin/dotfiles-init.sh b/bin/dotfiles-init.sh new file mode 100644 index 0000000..42f65d3 --- /dev/null +++ b/bin/dotfiles-init.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +dotfiles() +{ + git --git-dir=$HOME/.dotfiles --work-tree=$HOME "$@" +} + +cd $HOME +git init --bare $HOME/.dotfiles +dotfiles config --local status.showUntrackedFiles no +dotfiles remote add origin git@bitbucket.org:jannikz/dotfiles.git +dotfiles fetch +dotfiles reset --hard origin/master +dotfiles branch -u origin/master diff --git a/dotfiles-init.sh b/dotfiles-init.sh deleted file mode 100644 index 42f65d3..0000000 --- a/dotfiles-init.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -dotfiles() -{ - git --git-dir=$HOME/.dotfiles --work-tree=$HOME "$@" -} - -cd $HOME -git init --bare $HOME/.dotfiles -dotfiles config --local status.showUntrackedFiles no -dotfiles remote add origin git@bitbucket.org:jannikz/dotfiles.git -dotfiles fetch -dotfiles reset --hard origin/master -dotfiles branch -u origin/master