Change template temp folder, remove unnecessary rmdir
This commit is contained in:
parent
4380e175eb
commit
1e4232fb0e
@ -5,7 +5,7 @@ name="$(basename "$0" .sh)"
|
|||||||
deps="git rsync mktemp basename"
|
deps="git rsync mktemp basename"
|
||||||
|
|
||||||
logfile="${PWD}/${name}.log"
|
logfile="${PWD}/${name}.log"
|
||||||
tempfolder="$(mktemp -d)"
|
tempfolder="$(mktemp -d tmp.replicate.XXXXXXXX --tmpdir)"
|
||||||
gitdir="$PWD/.dotfiles"
|
gitdir="$PWD/.dotfiles"
|
||||||
homedir="$PWD"
|
homedir="$PWD"
|
||||||
repo='git@gitlab.com:rehashedsalt/home.git'
|
repo='git@gitlab.com:rehashedsalt/home.git'
|
||||||
@ -56,7 +56,6 @@ fi
|
|||||||
log "Moving cloned repo from \"$tempfolder\" into \"$homedir\""
|
log "Moving cloned repo from \"$tempfolder\" into \"$homedir\""
|
||||||
rsync -rvl --exclude ".git" "$tempfolder/" "$homedir/" >> "$logfile"
|
rsync -rvl --exclude ".git" "$tempfolder/" "$homedir/" >> "$logfile"
|
||||||
rm -rf "$tempfolder"
|
rm -rf "$tempfolder"
|
||||||
rmdir "$tempfolder"
|
|
||||||
# Finish syncing
|
# Finish syncing
|
||||||
log "Updating submodules and performing basic configuration"
|
log "Updating submodules and performing basic configuration"
|
||||||
git --git-dir="$gitdir" --work-tree="$homedir" submodule update --init --recursive --remote >> "$logfile" 2>&1
|
git --git-dir="$gitdir" --work-tree="$homedir" submodule update --init --recursive --remote >> "$logfile" 2>&1
|
||||||
|
Loading…
Reference in New Issue
Block a user