Skip to content

CLI: use sudo (if such privilege exists) to install the Database Lab client (CLI)

Vitaliy Kukharik requested to merge cli_install_with_sudo into master

Description

  • Added a check for the presence of sudo.
    • if there is such a privilege, the installation is performed using sudo
    • if there is no such privilege (or a password is required), we suggest moving the dblib file to /usr/local/bin yourself.
  • Minor warning fixes from shellcheck.

Example

# with sudo
ubuntu@ip-172-31-11-90:~$ /tmp/cli_install.sh 
Done!
To start, run:
    dblab init

# without sudo
ubuntu@ip-172-31-11-90:~$ sudo su - postgres
postgres@ip-172-31-11-90:~$ /tmp/cli_install.sh
Downloaded to:
    ~/.dblab/dblab
Add it to $PATH or move the binary manually:
    sudo mv ~/.dblab/dblab /usr/local/bin/dblab
To start, run:
    dblab init

Related issue

Examples

Checklist

  • MR description has been reviewed
  • MR changes are functionally tested
  • MR does NOT have text changes OR there are text changes and they have been reviewed
  • MR does NOT have API/CLI changes OR there are API/CLI changes and they have been reviewed
  • MR does NOT have UI changes OR there are UI changes and they have been reviewed
Edited by Vitaliy Kukharik

Merge request reports