aboutsummaryrefslogtreecommitdiff
path: root/pdebuild
diff options
context:
space:
mode:
authorJunichi Uekawa <dancer@netfort.gr.jp>2011-12-04 22:17:32 +0900
committerJunichi Uekawa <dancer@netfort.gr.jp>2011-12-04 22:17:32 +0900
commit36b02fd98cdfefb9a6ec1fd4cf006c7eaf484506 (patch)
tree229ccf873a2631e0121596152b732e62aae69a15 /pdebuild
parent57a6a286b437ef6715ec7ac608898a0dabc32444 (diff)
downloadpbuilder-36b02fd98cdfefb9a6ec1fd4cf006c7eaf484506.tar
pbuilder-36b02fd98cdfefb9a6ec1fd4cf006c7eaf484506.tar.gz
factor out the file copy test part and add a test.
Use 'PWD' like other parts of the codebase. Coding style uses $() not ``.
Diffstat (limited to 'pdebuild')
-rw-r--r--pdebuild9
1 files changed, 2 insertions, 7 deletions
diff --git a/pdebuild b/pdebuild
index 6502f2f..2bfe858 100644
--- a/pdebuild
+++ b/pdebuild
@@ -46,15 +46,10 @@ export BUILDRESULTGID=$(id -g)
if [ "${USE_PDEBUILD_INTERNAL}" = 'yes' ]; then
${PBUILDERROOTCMD} ${PDEBUILD_PBUILDER} --execute ${EXTRA_CONFIGFILE[@]/#/--configfile } --bindmounts $(readlink -f ..) "$@" -- /usr/lib/pbuilder/pdebuild-internal ${PWD} --debbuildopts "" --debbuildopts "${DEBBUILDOPTS}" --uid "${BUILDRESULTUID}" --gid "${BUILDRESULTGID}" --pbuildersatisfydepends "$PBUILDERSATISFYDEPENDSCMD"
if [ -d "${BUILDRESULT}" ]; then
- PARENT_DIR=`dirname $(pwd)`
for files in $(sed -rn '/^Files:/,${s/^ .* ([^ ]+)$/\1/p}' ../${CHANGES}); do
- if [ "${PARENT_DIR}" != "${BUILDRESULT}" ]; then
- cp -a ../"$files" "${BUILDRESULT}"
- fi
+ conditional_cp_a ../"$files" "${BUILDRESULT}"
done
- if [ "${PARENT_DIR}" != "${BUILDRESULT}" ]; then
- cp -a ../${CHANGES} "${BUILDRESULT}"
- fi
+ conditional_cp_a ../${CHANGES} "${BUILDRESULT}"
else
log "E: BUILDRESULT=[$BUILDRESULT] is not a directory."
exit 1