X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=webi%2Finstall.sh;h=8df8d86b36a782f74a815401323f6d52cbf57ada;hb=91512157ab426c87e0a82b594620e90e324b23a3;hp=535598d81830495800029614069b8bbda98e3ff6;hpb=eeaa8db394e92b53b0031fa62b33b969366a7913;p=webi-installers%2F.git diff --git a/webi/install.sh b/webi/install.sh index 535598d..8df8d86 100644 --- a/webi/install.sh +++ b/webi/install.sh @@ -1,63 +1,31 @@ #!/bin/bash -# title: Webi -# homepage: https://webinstall.dev -# tagline: | -# Webi is how developers install their tools. -# description: | -# 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. -# -# - Easy to remember. -# - No magic, no nonesense, no bulk. -# - What you would have done for yourself. -# -# examples: | -# You can install _exactly_ what you need, from memory, via URL: -# -# ```bash -# curl https://webinstall.dev/node@lts | bash -# ``` -# -# Or via `webi`, the tiny `curl | bash` shortcut command that comes with each install: -# -# ```bash -# webi node@latest -# ``` -# -# ```bash -# webi golang@v1.14 -# ``` -# -# ```bash -# webi rustlang -# ``` -# -# You can see exactly what PATHs have been edited: -# -# ```bash -# pathman list -# ``` -# -# And where: -# -# ```bash -# cat $HOME/.config/envman/PATH.env -# ``` -# +# Note: 'webi' is a special case. It's actually just a helper utility that comes with every installer. +# See https://github.com/webinstall/packages/blob/master/_webi/bootstrap.sh for the source. -{ +function __faux_webi() { -if [ -f "$HOME/.local/bin/webi" ]; then - set +e - cur_webi="$(command -v webi)" - set -e - if [ -z "$cur_webi" ]; then - webi_path_add "$HOME/.local/bin" - fi - echo "Installed 'webi'" -else - # for when this file is run on its own, not from webinstall.dev - echo "Install any other package via https://webinstall.dev and webi will be installed as part of the bootstrap process" -fi + if [ -f "$HOME/.local/bin/webi" ]; then + set +e + cur_webi="$(command -v webi)" + set -e + if [ -z "$cur_webi" ]; then + webi_path_add "$HOME/.local/bin" + fi + else + # for when this file is run on its own, not from webinstall.dev + echo "Install any other package via https://webinstall.dev and webi will be installed as part of the bootstrap process" + fi + echo "" + echo "'webi' installed to ~/.local/bin/webi" + echo "" + echo "Usage:" + echo " webi [@version] ..." + echo "" + echo "Example:" + echo " webi node@lts prettier vim-essentials" + echo "" } + +__faux_webi