replicate.sh: Fix error detection with git

This commit is contained in:
Salt 2018-08-16 21:53:16 -05:00
parent dfcbacfc0f
commit 6f011428ee

View File

@ -13,7 +13,7 @@ repo='git@gitlab.com:rehashedsalt/home.git'
config='git --git-dir="$gitdir" --work-tree="$HOME"'
git clone --recursive --separate-git-dir="$gitdir" "$repo" "$tempfolder"
if ! $0; then
if ! $?; then
printf "$0: error: failed cloning repository \"$repo\"\n" 1>&2
printf "Do you have the appropriate permissions? Does the remote host know your key?\n"
exit 2