IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 30, 2007, 12:43:54 PM (19 years ago)
Author:
eugene
Message:

adding macros to add and del databases

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/pantasks.pro

    r13533 r13554  
    2222# is only used if DB:n is 0
    2323$DB:n = 0
     24
     25# user function to add databases by name (avoids duplicates)
     26macro add.database
     27  if ($0 != 2)
     28    echo "USAGE: add.database (db)"
     29    break
     30  end
     31  if ($?DB:n == 0)
     32    list DB -add $1
     33    return
     34  end
     35
     36  $found = 0
     37  for i 0 $DB:n
     38    if ($DB:$i == $1)
     39      $found = 1
     40      echo "$DB:$i set"
     41      last
     42    end
     43  end
     44 
     45  if ($found == 0)
     46    list DB -add $1
     47  end
     48end
     49
     50macro del.database
     51  if ($0 != 2)
     52    echo "USAGE: del.database (db)"
     53    break
     54  end
     55  if ($?DB:n == 0)
     56    return
     57  end
     58
     59  list DB -del $1
     60end
    2461
    2562macro init.cluster.po
Note: See TracChangeset for help on using the changeset viewer.