217 done
218
219 #
220 # Remove any header files. If they're in the closed tree, they're
221 # probably not freely redistributable.
222 #
223 (cd "$tmpdir/closed/$rootdir"; find . -name \*.h \
224 -a \! -name lc_core.h \
225 -a \! -name localedef.h \
226 -exec rm -f {} \;)
227
228 #
229 # Remove empty directories that the open tree doesn't need.
230 #
231 # Step 1: walk the redistributable manifests to find out which directories
232 # are specified in the open packages; save that list to a temporary
233 # file $needdirs.
234 #
235 MACH=$(uname -p)
236 (cd "$SRC/pkg/packages.$MACH"; \
237 nawk '/^dir/ {sub(/.+ path=/, ""); print $1;}' *.metadata.*.redist | \
238 sort -u > "$needdirs")
239
240 #
241 # Step 2: go to our closed directory, and find all the subdirectories,
242 # filtering out the ones needed by the open packages (saved in that
243 # temporary file). Sort in reverse order, so that parent directories
244 # come after any subdirectories, and pipe that to rmdir. If there are
245 # still any lingering files, rmdir will complain. That's fine--we
246 # only want to delete empty directories--so redirect the complaints to
247 # /dev/null.
248 #
249 (cd "$tmpdir/closed/$rootdir"; \
250 find * -type d -print | /usr/xpg4/bin/grep -xv -f $needdirs | \
251 sort -r | xargs -l rmdir 2>/dev/null )
252
253 rm "$needdirs"
254
255 #
256 # Exclude signed crypto binaries; they are delivered in their
257 # own tarball.
|
217 done
218
219 #
220 # Remove any header files. If they're in the closed tree, they're
221 # probably not freely redistributable.
222 #
223 (cd "$tmpdir/closed/$rootdir"; find . -name \*.h \
224 -a \! -name lc_core.h \
225 -a \! -name localedef.h \
226 -exec rm -f {} \;)
227
228 #
229 # Remove empty directories that the open tree doesn't need.
230 #
231 # Step 1: walk the redistributable manifests to find out which directories
232 # are specified in the open packages; save that list to a temporary
233 # file $needdirs.
234 #
235 MACH=$(uname -p)
236 (cd "$SRC/pkg/packages.$MACH"; \
237 /usr/xpg4/bin/awk '/^dir/ {sub(/.+ path=/, ""); print $1;}' *.metadata.*.redist | \
238 sort -u > "$needdirs")
239
240 #
241 # Step 2: go to our closed directory, and find all the subdirectories,
242 # filtering out the ones needed by the open packages (saved in that
243 # temporary file). Sort in reverse order, so that parent directories
244 # come after any subdirectories, and pipe that to rmdir. If there are
245 # still any lingering files, rmdir will complain. That's fine--we
246 # only want to delete empty directories--so redirect the complaints to
247 # /dev/null.
248 #
249 (cd "$tmpdir/closed/$rootdir"; \
250 find * -type d -print | /usr/xpg4/bin/grep -xv -f $needdirs | \
251 sort -r | xargs -l rmdir 2>/dev/null )
252
253 rm "$needdirs"
254
255 #
256 # Exclude signed crypto binaries; they are delivered in their
257 # own tarball.
|