summaryrefslogtreecommitdiffstats
path: root/src/ob-unpacksource.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/ob-unpacksource.sh')
-rw-r--r--src/ob-unpacksource.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ob-unpacksource.sh b/src/ob-unpacksource.sh
index 8b3a01e..48e7269 100644
--- a/src/ob-unpacksource.sh
+++ b/src/ob-unpacksource.sh
@@ -37,7 +37,7 @@ main()
ob_init_package '..'
ob_parse_package_metadata -c '.opkbuild.cache'
- if [ -d ../src ]; then
+ if [ -d '../src' ]; then
unpack_native
else
unpack_upstream
@@ -47,7 +47,7 @@ main()
unpack_native()
{
ob_info "$(ob_get_msg 'unpacking_native')"
- cp -Rp ../src src || ob_error "$(ob_get_msg 'cant_unpack_native')"
+ cp -Rp '../src' 'src' || ob_error "$(ob_get_msg 'cant_unpack_native')"
}
unpack_upstream()
@@ -61,7 +61,7 @@ unpack_upstream()
get_upstream_archive()
{
upstream_archive_base="${OB_SOURCE}-${OB_SOURCE_VERSION_UPSTREAM}.orig.tar."
- upstream_archive="$(find .. -name "${upstream_archive_base}*")"
+ upstream_archive="$(find '..' -name "${upstream_archive_base}*")"
case "$(echo "${upstream_archive}" | grep -v '^$' | wc -l)" in
0)
ob_error "$(ob_get_msg 'no_sources')"
@@ -117,7 +117,7 @@ extract_upstream()
ob_info "$(ob_get_msg 'unpacking_upstream')"
tar "-x${upstream_archive_z}f" "${upstream_archive}" || \
ob_error "$(ob_get_msg 'cant_unpack_upstream')"
- mv "${upstream_archive_dir}" src || \
+ mv "${upstream_archive_dir}" 'src' || \
ob_error "$(ob_get_msg 'cant_move_native')"
}