summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-10-24 00:06:29 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-10-24 00:06:29 (EDT)
commitc20bbe68307a79c5a08ece9cb7b752ff1555c73d (patch)
treef65f5e5b5ceda2c346a371190eb26ffff4fd6850
parent43bc4c837f5b47a45efdafceb80b76a1fed41ffb (diff)
Look both ways before unpacking sources.
-rw-r--r--locale/en_US/opkbuild.sh1
-rw-r--r--src/ob-unpacksource.sh10
2 files changed, 8 insertions, 3 deletions
diff --git a/locale/en_US/opkbuild.sh b/locale/en_US/opkbuild.sh
index abaaae3..c1c3ebd 100644
--- a/locale/en_US/opkbuild.sh
+++ b/locale/en_US/opkbuild.sh
@@ -73,6 +73,7 @@ msg_opkbuild_checking_build_deps='Checking build dependencies...'
msg_opkbuild_setup_build_env='Setting up build environment...'
# ob-unpacksource
+msg_opkbuild_already_unpacked='Sources already unpacked'
msg_opkbuild_unpacking_native='Copying native source directory...'
msg_opkbuild_cant_unpack_native='Can'\''t copy native source directory'
msg_opkbuild_no_sources='No native or upstream sources found'
diff --git a/src/ob-unpacksource.sh b/src/ob-unpacksource.sh
index baea705..9954454 100644
--- a/src/ob-unpacksource.sh
+++ b/src/ob-unpacksource.sh
@@ -37,10 +37,14 @@ main()
ob_init_package '..'
ob_parse_package_metadata -c '.opkbuild.cache'
- if [ -d '../src' ]; then
- unpack_native
+ if [ -d 'src' ]; then
+ ob_info "$(ob_get_msg 'already_unpacked')"
else
- unpack_upstream
+ if [ -d '../src' ]; then
+ unpack_native
+ else
+ unpack_upstream
+ fi
fi
}