GenericMappingTools / gmtserver-admin

Cache data and script for managing the GMT data server
GNU Lesser General Public License v3.0
7 stars 3 forks source link

Add PLANET in server-release.sh #223

Closed Esteban82 closed 1 year ago

Esteban82 commented 1 year ago

Fixes #222

Esteban82 commented 1 year ago

Ready for review.

Esteban82 commented 1 year ago

I add WIP because I think that there is another issue.

Esteban82 commented 1 year ago

@PaulWessel this doesn't look well.

2c. Count the number of data files or directory entries and start first line of /tmp/gmt_data_server.txt:

cat $(cat /tmp/datasets.lis) | grep -v '^#' | wc -l | awk '{printf "%d\n", }' > /tmp/gmt_data_server.txt
awk: cmd. line:1: {printf "%d\n", }
awk: cmd. line:1:                 ^ syntax error
awk: cmd. line:1: {printf "%d\n", }
awk: cmd. line:1:                  ^ unexpected newline or end of string
Esteban82 commented 1 year ago

Should I add $0?

cat $(cat datasets.lis) | grep -v '^#' | wc -l | awk '{printf "%d\n", $0 }' > gmt_data_server.txt

PaulWessel commented 1 year ago

Should be $1 not 0

Esteban82 commented 1 year ago

Yes, I found the error.

Esteban82 commented 1 year ago

Here I can't find the header.

# 2d. Append the header information section after piping via sed to get the date
cat /export/gmtserver/gmt/gmt_data_server_header.txt | sed -f /tmp/sed.txt >> /tmp/gmt_data_server.txt
cat: /export/gmtserver/gmt/gmt_data_server_header.txt: No such file or directory

Solutions:

1) add that file there. 2) use this path instead /export/gmtserver/gmt/gmtserver-admin/information

I think 2. is better.

PaulWessel commented 1 year ago

I think that is what I programmed, no? Might have to run git pull to update the gmtserver-admin dir on oceania.

FYI, tomorrow is birthday so will be out for theatre and dinner so dont expect too much feedback until 22-23 hours from now!

Esteban82 commented 1 year ago

Ok. Enjoy!!

Esteban82 commented 1 year ago

I think that now is ready for review.

The only issue remaining is that right now, in Oceania, only earth_synbath has the *_*_server.txt file. So, when I run this: find /export/gmtserver/gmt/data/server -name '*_*_server.txt' > /tmp/datasets.lis

I only will get that file and this will result that the new gmt_data_server.txt only will have the records of earth_synbath.

This could be easily solve by:

  1. using rsync with all the data sets (this will copy to oceania the dataset of all the other planets).
  2. using rsync just for the earth data set ( rsync -al /export/gmtserver/gmt/candidate/server/earth/ /export/gmtserver/gmt/data/server/earth ).

I could the 2. What do you think @PaulWessel? Should I proceed?