c5730b2a6a18bf422c65f820b8745b406db1db98
[webi-installers/.git] / webi / install.sh
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 {
24
25 if [ -f "$HOME/.local/bin/webi" ]; then
26   set +e
27   cur_webi="$(command -v webi)"
28   set -e
29   if [ -z "$cur_webi" ]; then
30     webi_path_add "$HOME/.local/bin"
31   fi
32   echo "Installed 'webi'"
33 else
34   # for when this file is run on its own, not from webinstall.dev
35   echo "Install any other package via https://webinstall.dev and webi will be installed as part of the bootstrap process"
36 fi
37
38 }