Print this page
XXX Remove nawk(1)

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/scripts/bindrop.sh
          +++ new/usr/src/tools/scripts/bindrop.sh
↓ open down ↓ 226 lines elided ↑ open up ↑
 227  227  
 228  228  #
 229  229  # Remove empty directories that the open tree doesn't need.
 230  230  #
 231  231  # Step 1: walk the redistributable manifests to find out which directories
 232  232  # are specified in the open packages; save that list to a temporary
 233  233  # file $needdirs.
 234  234  #
 235  235  MACH=$(uname -p)
 236  236  (cd "$SRC/pkg/packages.$MACH"; \
 237      -        nawk '/^dir/ {sub(/.+ path=/, ""); print $1;}' *.metadata.*.redist | \
      237 +        /usr/xpg4/bin/awk '/^dir/ {sub(/.+ path=/, ""); print $1;}' *.metadata.*.redist | \
 238  238          sort -u > "$needdirs")
 239  239  
 240  240  #
 241  241  # Step 2: go to our closed directory, and find all the subdirectories,
 242  242  # filtering out the ones needed by the open packages (saved in that
 243  243  # temporary file).  Sort in reverse order, so that parent directories
 244  244  # come after any subdirectories, and pipe that to rmdir.  If there are
 245  245  # still any lingering files, rmdir will complain.  That's fine--we
 246  246  # only want to delete empty directories--so redirect the complaints to
 247  247  # /dev/null.
↓ open down ↓ 31 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX