Commit 864aa42c authored by Mattia Rizzolo's avatar Mattia Rizzolo

handle cd failing

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mapreri@ubuntu.com>
parent ab032d0d
...@@ -13,7 +13,7 @@ bzr_clone_repo() { ...@@ -13,7 +13,7 @@ bzr_clone_repo() {
if [[ ! -d "${dest}" ]]; then if [[ ! -d "${dest}" ]]; then
bzr branch "${url}" "${dest}" -q bzr branch "${url}" "${dest}" -q
else else
(cd "${dest}"; bzr pull -q) (cd "${dest}" && bzr pull -q)
fi fi
} }
...@@ -31,7 +31,7 @@ bzr_needs_update() { ...@@ -31,7 +31,7 @@ bzr_needs_update() {
return 0 return 0
fi fi
latest="$(cd "${repo}"; bzr revno)" latest="$(cd "${repo}" && bzr revno)"
if [[ "$(cat "${current}")" != "${latest}" ]]; then if [[ "$(cat "${current}")" != "${latest}" ]]; then
return 0 return 0
...@@ -51,5 +51,5 @@ bzr_save_revision() { ...@@ -51,5 +51,5 @@ bzr_save_revision() {
repo="${DIR_BASE}/${name}/repo" repo="${DIR_BASE}/${name}/repo"
dest="${build}/.revision" dest="${build}/.revision"
(cd "${repo}"; bzr revno) > "${dest}" (cd "${repo}" && bzr revno) > "${dest}"
} }
...@@ -13,7 +13,7 @@ git_clone_repo() { ...@@ -13,7 +13,7 @@ git_clone_repo() {
if [[ ! -d "${dest}" ]]; then if [[ ! -d "${dest}" ]]; then
git clone "${url}" "${dest}" -q git clone "${url}" "${dest}" -q
else else
(cd "${dest}"; git pull -q) (cd "${dest}" && git pull -q)
fi fi
echo "${dest}" echo "${dest}"
...@@ -33,7 +33,7 @@ git_needs_update() { ...@@ -33,7 +33,7 @@ git_needs_update() {
return 0 return 0
fi fi
latest="$(cd ${repo}; git rev-parse master)" latest="$(cd "${repo}" && git rev-parse master)"
if [[ "$(cat "${current}")" != "${latest}" ]]; then if [[ "$(cat "${current}")" != "${latest}" ]]; then
return 0 return 0
...@@ -53,5 +53,5 @@ git_save_revision() { ...@@ -53,5 +53,5 @@ git_save_revision() {
repo="${DIR_BASE}/${name}/repo" repo="${DIR_BASE}/${name}/repo"
dest="${build}/.commit" dest="${build}/.commit"
(cd "${repo}"; git rev-parse master) > "${dest}" (cd "${repo}" && git rev-parse master) > "${dest}"
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment