update (almost) all taglines and descs
[webi-installers/.git] / webi / install.sh
1 #!/bin/bash
2
3 # title: Webi
4 # homepage: https://webinstall.dev
5 # tagline: |
6 #   Webi is how developers install their tools.
7 # description: |
8 #   Webi is what you would have created if you automated how you install your common tools yourself: Simple, direct downloads from official sources, unpacked into `$HOME/.local`, added to `PATH`, symlinked for easy version switching, with minimal niceties like resuming downloads and 'stable' tags.
9 #   
10 #   - Easy to remember.
11 #   - No magic, no nonesense, no bulk.
12 #   - What you would have done for yourself.
13 #
14 # examples: |
15 #   You can install _exactly_ what you need, from memory, via URL:
16 #
17 #   ```bash
18 #   curl https://webinstall.dev/node@lts | bash
19 #   ```
20 #
21 #   Or via `webi`, the tiny `curl | bash` shortcut command that comes with each install:
22 #
23 #   ```bash
24 #   webi node@latest
25 #   ```
26 #
27 #   ```bash
28 #   webi golang@v1.14
29 #   ```
30 #
31 #   ```bash
32 #   webi rustlang
33 #   ```
34 #
35 #   You can see exactly what PATHs have been edited:
36 #
37 #   ```bash
38 #   pathman list
39 #   ```
40 #
41 #   And where:
42 #
43 #   ```bash
44 #   cat $HOME/.config/envman/PATH.env
45 #   ```
46 #
47
48 {
49
50 if [ -f "$HOME/.local/bin/webi" ]; then
51   set +e
52   cur_webi="$(command -v webi)"
53   set -e
54   if [ -z "$cur_webi" ]; then
55     webi_path_add "$HOME/.local/bin"
56   fi
57   echo "Installed 'webi'"
58 else
59   # for when this file is run on its own, not from webinstall.dev
60   echo "Install any other package via https://webinstall.dev and webi will be installed as part of the bootstrap process"
61 fi
62
63 }