From 1e4232fb0e0953ad3ddc9e79b9dff68a6c59be9f Mon Sep 17 00:00:00 2001 From: Salt Date: Wed, 10 Oct 2018 16:49:28 -0500 Subject: [PATCH] Change template temp folder, remove unnecessary rmdir --- replicate.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/replicate.sh b/replicate.sh index 66b8c60..a510dbd 100755 --- a/replicate.sh +++ b/replicate.sh @@ -5,7 +5,7 @@ name="$(basename "$0" .sh)" deps="git rsync mktemp basename" logfile="${PWD}/${name}.log" -tempfolder="$(mktemp -d)" +tempfolder="$(mktemp -d tmp.replicate.XXXXXXXX --tmpdir)" gitdir="$PWD/.dotfiles" homedir="$PWD" repo='git@gitlab.com:rehashedsalt/home.git' @@ -56,7 +56,6 @@ fi log "Moving cloned repo from \"$tempfolder\" into \"$homedir\"" rsync -rvl --exclude ".git" "$tempfolder/" "$homedir/" >> "$logfile" rm -rf "$tempfolder" -rmdir "$tempfolder" # Finish syncing log "Updating submodules and performing basic configuration" git --git-dir="$gitdir" --work-tree="$homedir" submodule update --init --recursive --remote >> "$logfile" 2>&1