Actualizar lib/steps/repos.sh
This commit is contained in:
parent
fde1d35f17
commit
bf7bdfa4d7
1 changed files with 8 additions and 2 deletions
|
|
@ -28,17 +28,23 @@ _clone_repos() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
start_spinner "Cloning ${name} (branch: ${branch})..."
|
start_spinner "Cloning ${name} (branch: ${branch})..."
|
||||||
if git clone --branch "$branch" "$url" "$dest" 2>&1 | grep -q "fatal\|error"; then
|
|
||||||
|
local clone_log="/tmp/clone_${name}_$$.log"
|
||||||
|
if ! git clone --branch "$branch" "$url" "$dest" > "$clone_log" 2>&1; then
|
||||||
stop_spinner
|
stop_spinner
|
||||||
log_error "git clone failed: ${url}"
|
log_error "git clone failed: ${url}"
|
||||||
|
cat "$clone_log"
|
||||||
|
rm -f "$clone_log"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
rm -f "$clone_log"
|
||||||
|
|
||||||
stop_spinner "${name} cloned → ${dest}"
|
stop_spinner "${name} cloned → ${dest}"
|
||||||
chmod 700 "$dest"
|
chmod 700 "$dest"
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -d "$HV_CORE/.git" ]; then
|
if [ ! -d "$HV_CORE/.git" ]; then
|
||||||
log_error "core repository not cloned successfully"
|
log_error "core repository not cloned"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue