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

server-release.sh doesn't work for a single data set #222

Closed Esteban82 closed 10 months ago

Esteban82 commented 10 months ago

@PaulWessel I run:

make server-release with mars_relief (as suggested by the text in the terminal).

$ make server-release
scripts/server-release.sh
server-release.sh: Enter a specific data set (e.g., mars_relief) or hit return for all data on the candidate: mars_relief 

In the first command of /tmp/release.sh, the names of both paths are wrong.

# 1. Issue rsync command
rsync -al /export/gmtserver/gmt/candidate/server/mars_relief /export/gmtserver/gmt/data/server/mars_relief

They have to include the name of the planet:

server/mars_relief         # wrong
server/mars/mars_relief    # OK

Solution

I think I can fix it.

I am thinking on editing the script. I can add a command that creates the variable {PLANET} from {DATASET}. Let me know if you are ok with this solution. Or let me know how would you like me to do it.

PaulWessel commented 10 months ago

Grep for PLANET and planet in scripts/*.sh. I have solved that elsewhere

Esteban82 commented 10 months ago

This ? planet=$(echo ${dataset} | awk -F_ '{print $1}')

Esteban82 commented 10 months ago

Is it possible that I have to add a "/" at the end of the first path here?

rsync -al /export/gmtserver/gmt/candidate/server/mars_relief /export/gmtserver/gmt/data/server/mars_relief

anbj commented 10 months ago

If you add a slash, rsync will copy the contents of the directory. No slash will copy the directory (with the content).

A slash basically means dir/*.

Esteban82 commented 10 months ago

Ok. I think that explains why I got server/earth/earth_synbath/earth_synbath/*.

anbj commented 10 months ago

And I think adding a slash does make sense. Why would you want a directory named mars_relief inside a directory named mars_relief.. if you’re not into that.