PawseySC / maali

A build system by the Pawsey Supercomputing Centre
BSD 3-Clause "New" or "Revised" License
1 stars 7 forks source link

maali needs to handle symlinks in cygnet repo #120

Open marcodelapierre opened 3 years ago

marcodelapierre commented 3 years ago

For better maintainability, whenever the same cygnet can be used on multiple systems, it should be stored under generic/, with symlinks being added in relevant OS-specific directories.

At the time of writing, this is the case of the HDF5 cygnet.

In order to still be able to download the cygnet from the github repo, it is necessary to update maali so that it's able to check whether the downloaded cygnet is a link, and if so to download the real cygnet.

As per @pelahi suggestion, something along these lines should work:

result=`test -L ${orgfile}`
if [ result ]; then 
  relpath=`readlink -f ${orgfile}`
  # now parse relpath, get appropriate file
  newfile=
  wget ${newfile}
fi