Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error handling in install.sh #119

Merged
merged 4 commits into from
May 11, 2024
Merged

Commits on May 11, 2024

  1. maint: Ensure install.sh is executable

    The `install.sh` script should have the executable bit set in order to
    be able to run `./install.sh` from the source directory.
    stschulte committed May 11, 2024
    Configuration menu
    Copy the full SHA
    2b400ce View commit details
    Browse the repository at this point in the history
  2. Validate creation of temporary directory in install.sh

    The script install.sh creates a temporary directory in order to download
    and extract files. We should validate this succeeds otherwise all
    following steps can lead to strange results.
    
    Especially since we run `rm -rf` on the temp directory we should ensure
    we actually got a temporary directory and are not removing something
    unrelated.
    stschulte committed May 11, 2024
    Configuration menu
    Copy the full SHA
    2164341 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fddaea8 View commit details
    Browse the repository at this point in the history
  4. Validate successfull installation in install.sh

    The install.sh script moves the downloaded and extracted binary to
    `/usr/bin`. This may fail for different reasons, e.g.
    
    - `sudo` may not be available on the system at all
    - the current user has no sudo permissions to move the file
    
    Before this change we still saw a success message. We should check if
    the move actually succeeded.
    stschulte committed May 11, 2024
    Configuration menu
    Copy the full SHA
    7a17f52 View commit details
    Browse the repository at this point in the history