Print this page
XXX Remove nawk(1)

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/scripts/nightly.sh
          +++ new/usr/src/tools/scripts/nightly.sh
↓ open down ↓ 1830 lines elided ↑ open up ↑
1831 1831  function create_lock {
1832 1832          lockf=$1
1833 1833          lockvar=$2
1834 1834  
1835 1835          ldir=`dirname $lockf`
1836 1836          [ -d $ldir ] || newdir $ldir || exit 1
1837 1837          eval $lockvar=$lockf
1838 1838  
1839 1839          while ! staffer ln -s $hostname.$STAFFER.$$ $lockf 2> /dev/null; do
1840 1840                  basews=`basename $CODEMGR_WS`
1841      -                ls -l $lockf | nawk '{print $NF}' | IFS=. read host user pid
     1841 +                ls -l $lockf | /usr/xpg4/bin/awk '{print $NF}' | IFS=. read host user pid
1842 1842                  if [ "$host" != "$hostname" ]; then
1843 1843                          echo "$MACH build of $basews apparently" \
1844 1844                              "already started by $user on $host as $pid."
1845 1845                          exit 1
1846 1846                  elif kill -s 0 $pid 2>/dev/null; then
1847 1847                          echo "$MACH build of $basews already started" \
1848 1848                              "by $user as $pid."
1849 1849                          exit 1
1850 1850                  else
1851 1851                          # stale lock; clear it out and try again
↓ open down ↓ 579 lines elided ↑ open up ↑
2431 2431  
2432 2432  type bringover_subversion > /dev/null 2>&1 || function bringover_subversion {
2433 2433          typeset -x PATH=$PATH
2434 2434  
2435 2435          if [[ ! -d $CODEMGR_WS/.svn ]]; then
2436 2436                  staffer svn checkout $BRINGOVER_WS $CODEMGR_WS ||
2437 2437                          touch $TMPDIR/bringover_failed
2438 2438          else
2439 2439                  typeset root
2440 2440                  root=$(staffer svn info $CODEMGR_WS |
2441      -                        nawk '/^Repository Root:/ {print $NF}')
     2441 +                        /usr/xpg4/bin/awk '/^Repository Root:/ {print $NF}')
2442 2442                  if [[ $root != $BRINGOVER_WS ]]; then
2443 2443                          # We fail here because there's no way to update
2444 2444                          # from a named repo.
2445 2445                          cat <<-EOF
2446 2446                          \$BRINGOVER_WS doesn't match repository root:
2447 2447                            \$BRINGOVER_WS:  $BRINGOVER_WS
2448 2448                            Repository root: $root
2449 2449                          EOF
2450 2450                          touch $TMPDIR/bringover_failed
2451 2451                  else
↓ open down ↓ 320 lines elided ↑ open up ↑
2772 2772                          #
2773 2773                          # For builds that don't copy the IHV proto area, add the
2774 2774                          # IHV proto list to the build's proto list if the
2775 2775                          # reference was built with -X.
2776 2776                          #
2777 2777                          # Use the presence of the first file entry of the cached
2778 2778                          # IHV proto list in the reference list to determine
2779 2779                          # whether it was built with -X or not.
2780 2780                          #
2781 2781                          IHV_REF_PROTO_LIST=$SRC/pkg/proto_list_ihv_$MACH
2782      -                        grepfor=$(nawk '$1 == "f" { print $2; exit }' \
     2782 +                        grepfor=$(/usr/xpg4/bin/awk '$1 == "f" { print $2; exit }' \
2783 2783                                  $IHV_REF_PROTO_LIST 2> /dev/null)
2784 2784                          if [ $? = 0 -a -n "$grepfor" ]; then
2785 2785                                  if [ "$X_FLAG" = "y" ]; then
2786 2786                                          grep -w "$grepfor" \
2787 2787                                                  $REF_PROTO_LIST > /dev/null
2788 2788                                          if [ ! "$?" = "0" ]; then
2789 2789                                                  REF_IHV_PROTO="-d $IHV_REF_PROTO_LIST"
2790 2790                                          fi
2791 2791                                  else
2792 2792                                          grep -w "$grepfor" \
↓ open down ↓ 455 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX