aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-10-24 09:28:29 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-10-24 09:28:29 +0000
commit2663953de292d3029d4c345fe938c1c24f442608 (patch)
treed9d899af01160be4cf6dad118ed38d1064285d2a
parent493200bce655a178628607b6f4f060f77caa701f (diff)
downloadpaludis-2663953de292d3029d4c345fe938c1c24f442608.tar.gz
paludis-2663953de292d3029d4c345fe938c1c24f442608.tar.xz
Be like Portage: don't create ${S}, and don't cd ${S} if ${S} doesn't exist. From Bo ├śrsted Andresen.
-rw-r--r--ebuild/src_compile.bash5
-rw-r--r--ebuild/src_install.bash4
2 files changed, 6 insertions, 3 deletions
diff --git a/ebuild/src_compile.bash b/ebuild/src_compile.bash
index 6f5c4d3..4147c6d 100644
--- a/ebuild/src_compile.bash
+++ b/ebuild/src_compile.bash
@@ -31,8 +31,9 @@ src_compile()
ebuild_f_compile()
{
- mkdir -p ${S}
- cd ${S} || die "cd to \${S} (\"${S}\") failed"
+ if [[ -d "${S}" ]]; then
+ cd "${S}" || die "cd to \${S} (\"${S}\") failed"
+ fi
if hasq "compile" ${RESTRICT} ; then
ebuild_section "Skipping src_compile (RESTRICT)"
diff --git a/ebuild/src_install.bash b/ebuild/src_install.bash
index 1fb9b0c..02ff2fb 100644
--- a/ebuild/src_install.bash
+++ b/ebuild/src_install.bash
@@ -28,7 +28,9 @@ src_install()
ebuild_f_install()
{
- cd ${S} || die "cd to \${S} (\"${S}\") failed"
+ if [[ -d "${S}" ]]; then
+ cd "${S}" || die "cd to \${S} (\"${S}\") failed"
+ fi
if hasq "install" ${RESTRICT} ; then
ebuild_section "Skipping src_install (RESTRICT)"