BWHCNI / OpenMIMS

An ImageJ plugin for MIMS image analysis
http://nano.bwh.harvard.edu
7 stars 1 forks source link

getOM.sh: no check of fiji download #43

Closed cpoczatek closed 6 years ago

cpoczatek commented 8 years ago

If the curl call to download Fiji fails, script continues, throws errors, and makes some broken symlinks. Could do a check of exit status of curl, or add -e bash strict flag. Should also probably add cleanup code if errored out.

collin@tenkara:util$ ./getOM.sh 
 Downloading Fiji... 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 81  181M   81  148M    0     0   580k      0  0:05:20  0:04:21  0:00:59  104k
curl: (18) transfer closed with 35065216 bytes remaining to read
Archive:  fiji-linux64.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of fiji-linux64.zip or
        fiji-linux64.zip.zip, and cannot find fiji-linux64.zip.ZIP, period.
mv: cannot stat 'Fiji.app': No such file or directory
./getOM.sh: line 24: cd: /home/collin/bin/Fiji.app: No such file or directory
 Adding OpenMIMS update site... 
./getOM.sh: line 27: ./ImageJ-linux64: No such file or directory
 Updating Fiji... 
./getOM.sh: line 29: ./ImageJ-linux64: No such file or directory
~/bin/ is in path
 Create .desktop file and add .im and .nrrd mimetypes...
 Done.
taylorwrt commented 6 years ago

We no longer recommend the use of curl to download either Fiji or OpenMIMS. Since the update site for OpenMIMS is now hosted in imageJ, like most of the plugins, rather than on a Partners virtual machine, the plugin for OpenMIMS is always available in freshly-downloaded copies of Fiji. Now to get OpenMIMS, one only needs to go to the Help menu of Fiji and select "Update..." then click on "Manage update sites" button and check the entry for OpenMIMS. After that, the "Open MIMS Image" item will be available on the Fiji Plugins menu, and will updated any time the user goes to the Update menu and clicks on "Apply changes". This seems to me simpler than the use of curl on the command line. I have updated the manual to recommend this technique rather than curl. No command line stuff, no custom shell scripts that always seem to break, no confusing symlinks, and no worrying that Partners will turn off the virtual machine that was hosting update site.