Changeset 135069 for trunk/base


Ignore:
Timestamp:
Apr 14, 2015, 8:36:11 PM (5 years ago)
Author:
cal@…
Message:

base: portmgr/jobs/mirror_macports.sh: fix variant extraction code and loops

I'm not sure if this script is actively being used, but it certainly didn't
correctly extract variants (it ran, e.g. port mirror collectd +[+]ntpd).
Additionally, a loop over a quoted string in bash does not tokenize the
contents of the string and loop over the tokens, but loops over the whole thing
at once, so let's remove the quotes where we don't really want them.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/portmgr/jobs/mirror_macports.sh

    r129479 r135069  
    4242
    4343  # for each variant
    44   for V in `$PORT -q variants $P | $CUT -d " " -f 1 | $CUT -d ":" -f 1 | $GREP -v universal | $XARGS`;
     44  for V in `$PORT -q variants $P | $CUT -c 4- | $CUT -d ":" -f 1 | $GREP -v universal | $XARGS`;
    4545  do
    4646    # mirror with each variant
     
    5151
    5252  # mirror with each platform (can exclude the one the server is running)
    53   for VERS in "8 9";
     53  for VERS in 8 9;
    5454  do
    55     for ARCH in "i386 powerpc";
     55    for ARCH in i386 powerpc;
    5656    do
    5757      echo "Mirroring ${P} with platform darwin ${VERS} ${ARCH}"
     
    5959    done
    6060  done
    61   for VERS in "10 11 12 13 14";
     61  for VERS in 10 11 12 13 14;
    6262  do
    6363    echo "Mirroring ${P} with platform darwin ${VERS} i386"
Note: See TracChangeset for help on using the changeset viewer.