Reworked the dotfiles part

This commit is contained in:
Tobias Schmidl 2018-11-02 11:39:41 +01:00
parent 3505c267b1
commit a774c347e9

View file

@ -10,12 +10,15 @@ sudo -S bash -c "apt update && apt dist-upgrade && \
update-command-not-found" update-command-not-found"
# clone the entire environment from github # clone the entire environment from github
TMPDIR=$(mktemp -u -p "$HOME" -d dotfiles.XXXXX) TMPDIR=$(mktemp -u -p "$HOME" -d dotfiles.XXXXX) && \
git clone --separate-git-dir="$HOME/.cfg" https://github.com/schtobia/dotfiles.git "$TMPDIR" git clone --separate-git-dir="$HOME/.cfg" https://github.com/schtobia/dotfiles.git "$TMPDIR" && \
[ -r "$TMPDIR/.gitmodules" ] && cp -vi "$TMPDIR/.gitmodules" "$HOME" [ -r "$TMPDIR/.gitmodules" ] && cp -vi "$TMPDIR/.gitmodules" "$HOME"
git --git-dir="$HOME/.cfg/" --work-tree="$HOME" config status.showUntrackedFiles no [ -d "$HOME/.cfg" ] && \
(cd $HOME && git --git-dir="$HOME/.cfg/" --work-tree="$HOME" checkout -- . && git --git-dir="$HOME/.cfg/" --work-tree="$HOME" submodule update --init --remote --recursive --rebase) git --git-dir="$HOME/.cfg/" --work-tree="$HOME" config status.showUntrackedFiles no && \
rm -r $TMPDIR (cd $HOME && \
git --git-dir="$HOME/.cfg/" --work-tree="$HOME" checkout -- . && \
git --git-dir="$HOME/.cfg/" --work-tree="$HOME" submodule update --init --remote --recursive --rebase)
rm -rf $TMPDIR
# node related # node related
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -