Slicer oneline installer script

Hi all,

I have created this one-line installer script for Slicer and I’d like to receive feedback from the community.

It has been tested on Ubuntu 22 and Windows 10

Linux & macOS version:

curl -fsSL https://raw.githubusercontent.com/mauigna06/slicer-installer/main/install.sh | sh

Windows version:

irm https://raw.githubusercontent.com/mauigna06/slicer-installer/main/install.ps1 | iex

The ascii logo is beautiful

I tried the linux one, but I stopped when it asked for sudo.

I think people are put off when an install script they run with curl asks for sudo. It’s already a lot of trust required to run it in the first place. I understand it’s to install runtime dependencies, but I also don’t necessarily want a script messing around with my system package manager on its own – that is for me to do. Maybe linux users would often feel the same.

Instead of automatically installing runtime dependencies, the script could just download and install Slicer to a local directory like you are doing, and then at the end it can print a command for the user to use to install runtime dependencies. Then sudo should not be needed and the experience would be smoother

Ok. Updated according to your feedback. Now it does not install dependencies by default so it does not ask for sudo, it just prints a comment to the user with the command he needs to execute for the dependencies install instead

Could you please try again?

It worked well! I am on ubuntu 22.04

Some feedback:

  • the “Downloading 3D Slicer…” display during download could display the version also
  • the icon it chose is completely wrong! it chose the splash screen as the icon!
  • when I ran it a second time, it tried to start the download all over again. it would be extra nice if the script checked whether you already have slicer in the same install location and did something differently. But I am not sure what is the best design: should it abort? offer to clean-reinstall? offer to install multiple versions side by side each with their own version-specific launcher?