summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denys@ti.com>2016-04-12 12:09:46 -0400
committerAlejandro del Castillo <alejandro.delcastillo@ni.com>2016-04-26 16:38:38 -0500
commit2be44e399f855192543a422009f2ea60e11fc1bc (patch)
tree2485fb596e34571079b2995d7b80dd53404c5e86
parentcc0c6d9a7c789af857310be60d11b460ed04249e (diff)
downloadopkg-utils-2be44e399f855192543a422009f2ea60e11fc1bc.tar.gz
opkg-utils-2be44e399f855192543a422009f2ea60e11fc1bc.tar.bz2
opkg-utils-2be44e399f855192543a422009f2ea60e11fc1bc.zip
opkg-build: re-do find/ls code to not fail on filenames with spaces
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
-rwxr-xr-xopkg-build9
1 files changed, 4 insertions, 5 deletions
diff --git a/opkg-build b/opkg-build
index a9ccad2..82a0a51 100755
--- a/opkg-build
+++ b/opkg-build
@@ -6,7 +6,6 @@
# 2003-04-25 rea@sr.unh.edu
# Updated to work on Familiar Pre0.7rc1, with busybox tar.
# Note it Requires: binutils-ar (since the busybox ar can't create)
-# For UID debugging it needs a better "find".
set -e
version=1.0
@@ -47,12 +46,12 @@ pkg_appears_sane() {
PKG_ERROR=0
- tilde_files=`find . -name '*~'`
+ tilde_files=`find . -name '*~' -ls -printf '\\\n'`
if [ -n "$tilde_files" ]; then
if [ "$noclean" = "1" ]; then
echo "*** Warning: The following files have names ending in '~'.
You probably want to remove them: " >&2
- ls -ld $tilde_files
+ echo -e $tilde_files
if [ $? -ne 0 ]; then
echo "*** Error: Fail to list files have names ending in '~'."
exit 1
@@ -64,12 +63,12 @@ You probably want to remove them: " >&2
fi
fi
- large_uid_files=`find . -uid +99 || true`
+ large_uid_files=`find . -uid +99 -ls -printf '\\\n' || true`
if [ "$ogargs" = "" ] && [ -n "$large_uid_files" ]; then
echo "*** Warning: The following files have a UID greater than 99.
You probably want to chown these to a system user: " >&2
- ls -ld $large_uid_files
+ echo -e $large_uid_files
if [ $? -ne 0 ]; then
echo "*** Error: Fail to list files have a UID greater than 99."
exit 1