#!/bin/csh
# file: ads-name-renew
# init: Oct 21 2019  Rob Rutten  Deil
# last: Oct 21 2019  Rob Rutten  Deil
# note: usage = ads-name-renew authorname
#       includes ads_make+publist for checking bibtex; ads-name-get does not

# help response if no input parameter
if ($#argv == 0) then 
  echo ===== ads-name-renew authorname
  exit
endif

# set variable
setenv author `basename $1:gr`   # takes off ./ and .txt if there

# warn re size-zero file in ads/abs
cd  ~/rr/www/bibfiles/ads/abs
if (-z $author.txt) then
    echo ==== file $author.txt had size zero; this name removed
    ads-name-remove $author
  endif
back

# get abs, bib, solabs for this name
cd ~/rr/www/bibfiles/ads/abs
ads-name-get $author
back

# run make_ads_publist as check on hanging (not done by ads-name-get)
cdprintbib
make_ads_publist $author
back


