25c49a1e706715b1bc1ca95ded4e32d5f5607fd0
[webi-installers/.git] / webi / install.bash
1 #!/bin/bash
2
3 # title: Webi
4 # homepage: https://webinstall.dev
5 # tagline: webinstall.dev for the CLI
6 # description: |
7 #   for the people like us that are too lazy even to run <kbd>curl&nbsp;https://webinstall.dev/PACKAGE_NAME&nbsp;|&nbsp;bash</kbd>
8 # examples: |
9 #   ```bash
10 #   webi node@latest
11 #   ```
12 #   <br/>
13 #
14 #   ```bash
15 #   webi golang@v1.14
16 #   ```
17 #   <br/>
18 #
19 #   ```bash
20 #   webi rustlang
21 #   ```
22
23 if [ -f "$HOME/.local/bin/webi" ]; then
24   set +e
25   cur_webi="$(command -v webi)"
26   set -e
27   if [ -z "$cur_webi" ]; then
28     webi_path_add "$HOME/.local/bin"
29   fi
30   echo "Installed 'webi'"
31 else
32   # for when this file is run on its own, not from webinstall.dev
33   echo "Install any other package via https://webinstall.dev and webi will be installed as part of the bootstrap process"
34 fi