manuel-munoz-aguirre / PyHIST

A pipeline to segment tissue from the background in histological images
GNU General Public License v3.0
56 stars 13 forks source link

Unsafe start of bash script #1

Closed manuel-munoz-aguirre closed 5 years ago

manuel-munoz-aguirre commented 5 years ago

This is an unsafe way to start the script, since it can fail in two cases:

  1. If the user decides to rename the script to contain a dot
  2. If the user calls the executable from another location, and the path contains a dot

It is usually fine to use just $0, but it can become troublesome if there is some parsing performed on that argument, since there is the assumption that the path/filename will always be consistent. Since it is only used for the manual, it might be best to use a fixed name

https://github.com/manuel-munoz-aguirre/HistologySegment/blob/f89fbea4818088a666e6f41a779b7eda930ebcc8/segment_hist/src/segment_hist.sh#L6