Hi Ole,

I like the idea of a simple way to install Gnu Parallel, but
the current script does a rather bad job. I'll list a few
examples; a modified version of the script is attached.

Let's start with the 'test' statement, it's just not working:

It will fail if more than one parallel-xyz directories exist
(and always download/install, even if there is no new release)
and it will also "fail" if there's only one parallel-xyz dir
and never download any updates (but re-install the already
downloaded version instead.)

  I added an additional 'wget' to get the version number
  of the latest version available and do the test with it

The tarball is downloaded (and extracted) in whatever dir the
script is called. So users might download several tarballs and
eventually (re-)install an old version over a newer one, in
case they run the script in different directories.

  I changed to /usr/src (if root) or $HOME otherwise. This
  might prevent using the script if the chosen directory is
  read-only, but I still prefer it over the current version
  (accidental downgrades). BTW: Installation would fail
  anyway if /usr/ and $HOME were read-only. :-)

The test, whether $HOME/bin is in PATH fails, if $HOME/bin is
not added the way you expect.

  I test whether $HOME/bin is in $PATH (shell environment)
  and I moved this part to the end of the script.

Thomas

Attachment: parallel_installer_updater.sh
Description: Bourne shell script

Reply via email to