replicate.sh: Make POSIX, hide untracked files

This commit is contained in:
Salt 2018-07-14 14:35:26 -05:00
parent 3f26c0452f
commit 422d0f2994

View File

@ -1,6 +1,8 @@
#!/usr/bin/env bash
tempfolder="/tmp/dots$(uuidgen)"
git clone --recursive --separate-git-dir="$HOME/.dotfiles" https://github.com/rehashedsalt/home.git $tempfolder
#!/bin/sh
tempfolder="/tmp/dots`uuidgen`"
gitdir="$HOME/.dotfiles"
git clone --recursive --separate-git-dir="$gitdir" https://github.com/rehashedsalt/home.git $tempfolder
rsync -rvl --exclude ".git" $tempfolder/ $HOME/
rm -r $tempfolder
git submodule update --init --recursive --remote --git-dir="$HOME/.dotfiles" --work-tree="$HOME" $HOME/
git submodule update --init --recursive --remote --git-dir="$gitdir" --work-tree="$HOME" $HOME/
git config --git-dir="$gitdir" status.showUntrackedFiles no