From fadefb692a7ff4312717346a1869d6fc508db177 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 04 Oct 2012 22:50:42 -0400 Subject: Fix some inconsistent quoting in utilities. --- (limited to 'src') diff --git a/src/ob-applypatches.sh b/src/ob-applypatches.sh index 98aabb9..7b43d41 100644 --- a/src/ob-applypatches.sh +++ b/src/ob-applypatches.sh @@ -39,11 +39,11 @@ apply_patches() { applied='false' - if [ -d ../patches ]; then + if [ -d '../patches' ]; then # Iterate over patches ordered alphabetically by name. - for patch in $(ls -1 ../patches | sort); do + for patch in $(ls -1 '../patches' | sort); do ob_info "$(ob_get_msg 'applying_patch')" "${patch}" - patch -N -p 1 -u -d src -i "../../patches/${patch}" || \ + patch -N -p 1 -u -d 'src' -i "../../patches/${patch}" || \ ob_error "$(ob_get_msg 'cant_apply_patch')" "${patch}" applied='true' done diff --git a/src/ob-buildopk.sh b/src/ob-buildopk.sh index 41a9acc..2ea8985 100644 --- a/src/ob-buildopk.sh +++ b/src/ob-buildopk.sh @@ -32,7 +32,7 @@ main() ob_init_package '..' ob_parse_package_metadata -c '.opkbuild.cache' - echo '2.0' >debian-binary + echo '2.0' >'debian-binary' if [ -n "${OB_DO_SOURCE}" ]; then build_opk "src:${OB_SOURCE}" "${OB_SOURCE_VERSION}" else @@ -40,7 +40,7 @@ main() build_opk "${pkg}" "${OB_BINARY_VERSION}" done fi - rm debian-binary + rm 'debian-binary' } build_opk() @@ -51,9 +51,9 @@ build_opk() (cd "${binary}.data" && tar -czf '../data.tar.gz' '.') (cd "${binary}.control" && tar -czf '../control.tar.gz' '.') - tar -czf ../../${binary}_${version}_all.opk \ - debian-binary data.tar.gz control.tar.gz - rm -Rf data.tar.gz control.tar.gz + tar -czf "../../${binary}_${version}_all.opk" \ + 'debian-binary' 'data.tar.gz' 'control.tar.gz' + rm -Rf 'data.tar.gz' 'control.tar.gz' } main "${@}" 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')" } -- cgit v0.9.1