Handle JAR files containing filenames with spaces (#243157, #461854, #547704)

- patch originally from  Peter Bieringer
This commit is contained in:
Panu Matilainen 2010-01-22 11:22:07 +02:00
parent afe45959fb
commit ab53232420
1 changed files with 9 additions and 7 deletions

View File

@ -38,8 +38,8 @@ if [ ! -z "$JARS" ]; then
rm -f $j
# Create the directories first.
for d in `find -type d | LC_ALL=C sort`; do
mkdir -p $JARDIR/$d
find -type d | LC_ALL=C sort | while read d; do
mkdir -p "$JARDIR/$d"
done
# Get the modtime from the newest ChangeLog. If the project
@ -63,15 +63,17 @@ if [ ! -z "$JARS" ]; then
fi
# move the contents over to the a new directory in order and set
# the times.
for f in `find -type f | LC_ALL=C sort`; do
cp $f $JARDIR/$f
touch --date="$DATE" $JARDIR/$f
# the times.
find -type f | LC_ALL=C sort | while read f; do
cp "$f" "$JARDIR/$f"
touch --date="$DATE" "$JARDIR/$f"
done
popd > /dev/null
# Set the times of the directories.
touch --date="$DATE" `find $JARDIR -type d`
find "$JARDIR" -type d | while read d; do
touch --date="$DATE" "$d"
done
# make the jar
pushd $JARDIR > /dev/null