From b18651835557016bb1e5145ce498c0ecad38af56 Mon Sep 17 00:00:00 2001 From: Kai Waldrant Date: Wed, 4 Dec 2024 10:01:00 +0100 Subject: [PATCH] Use XDG base directory spec (#93) * Use XDG base directory spec * update other installation path * Add comments * re-apply Kai's changes * Describe both system-wide and user-specific installations --------- Co-authored-by: Hendrik Cannoodt Co-authored-by: Toni Verbeiren --- installation/index.qmd | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/installation/index.qmd b/installation/index.qmd index ab08d716..f3ae8adf 100644 --- a/installation/index.qmd +++ b/installation/index.qmd @@ -140,10 +140,14 @@ You can choose to install `default-jdk` instead of the more explicit `openjdk-17 ## Linux -To install Viash to a `bin` folder in your current directory, run the following command to download and run the install script: +To install Viash to a `bin` folder on your PATH, run the following command to download and run the install script: ```bash -wget -qO- dl.viash.io | bash; mv viash $HOME/bin +wget -qO- dl.viash.io | bash +``` + +```bash +sudo mv viash /usr/local/bin ``` To verify your installation, run the following command: @@ -154,12 +158,32 @@ viash --help ## macOS -To install Viash to a `bin` folder in your current directory, run the following command to download and run the install script: +Viash can be easily installed in the working directory by running the following command: ```bash -curl -fsSL dl.viash.io | bash; mv viash $HOME/bin +curl -fsSL dl.viash.io | bash ``` +This will download the Viash binary to the current working directory and make it executable. + +Next, the Viash executable can be moved to either a system location (`/usr/local/bin`) or a user location (`~/bin`): + +1. To install the Viash executable to `/usr/local/bin`, simply run: + + ```bash + sudo mv viash /usr/local/bin + ``` + + Please note that `sudo` rights are required. + +2. To install Viash to the `$HOME/bin` folder, run the following command instead: + + ```bash + mv viash $HOME/bin/viash + ``` + + Make sure to create the `~/bin` directory if it doesn't exist yet and add `~/bin` to the `$PATH` environment variable in your shell. + To verify your installation, run the following command: ```bash @@ -168,10 +192,14 @@ viash --help ## Windows -To install Viash to a `bin` folder in your current directory, run the following command to download and run the install script: +To install Viash to a `bin` folder on your PATH, run the following command to download and run the install script: + +```bash +wget -qO- dl.viash.io | bash +``` ```bash -wget -qO- dl.viash.io | bash; mv viash $HOME/bin +sudo mv viash /usr/local/bin ``` To verify your installation, run the following command: