mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-02-14 17:49:53 +00:00
doc(posix): remove unnecessary references to bash
This commit is contained in:
@@ -44,7 +44,7 @@ You can do this **in about 30 seconds**:
|
||||
1. Run [`git-config-gpg`](https://webinstall.dev/git-config-gpg) from Webi:
|
||||
```sh
|
||||
# On Mac & Linux
|
||||
curl https://webinstall.dev/git-config-gpg | bash
|
||||
curl https://webinstall.dev/git-config-gpg | sh
|
||||
```
|
||||
2. Copy the GPG public key (it will be printed to your screen)
|
||||
3. Add it to your GitHub profile: <https://github.com/settings/gpg/new>
|
||||
|
||||
14
README.md
14
README.md
@@ -10,7 +10,7 @@
|
||||
- in short: no nonsense
|
||||
|
||||
```sh
|
||||
curl https://webinstall.dev/webi | bash
|
||||
curl https://webinstall.dev/webi | sh
|
||||
```
|
||||
|
||||
This repository contains the primary and community-submitted packages for
|
||||
@@ -42,9 +42,9 @@ More technically:
|
||||
4. `<package>/install.sh` may provide functions to override `_webi/template.sh`
|
||||
5. Recap:
|
||||
- `curl https://webinstall.dev/<pkg>` => `bootstrap-<pkg>.sh`
|
||||
- `bash bootstrap-<pkg>.sh` =>
|
||||
- `sh bootstrap-<pkg>.sh` =>
|
||||
`https://webinstall.dev/api/installers/<pkg>@<ver>.sh?formats=zip,tar`
|
||||
- `bash install-<pkg>.sh` => download, unpack, move, link, update PATH
|
||||
- `sh install-<pkg>.sh` => download, unpack, move, link, update PATH
|
||||
|
||||
# Philosophy (for package authors / maintainers publishing with webi)
|
||||
|
||||
@@ -73,7 +73,7 @@ An install consists of 5 parts in 4 files:
|
||||
my-new-package/
|
||||
- README.md (package info in frontmatter)
|
||||
- releases.js
|
||||
- install.sh (bash)
|
||||
- install.sh (POSIX Shell)
|
||||
- install.ps1 (PowerShell)
|
||||
```
|
||||
|
||||
@@ -88,7 +88,7 @@ See these **examples**:
|
||||
- https://github.com/webinstall/packages/blob/master/golang/
|
||||
|
||||
The `webinstall.dev` server uses the list of releases returned by
|
||||
`<your-package>/releases.js` to generate a bash script with most necessary
|
||||
`<your-package>/releases.js` to generate a shell script with most necessary
|
||||
variables and functions pre-defined.
|
||||
|
||||
You just fill in the blanks.
|
||||
@@ -144,8 +144,8 @@ It looks like this:
|
||||
`releases.js`:
|
||||
|
||||
```js
|
||||
module.exports = function (request) {
|
||||
return github(request, owner, repo).then(function (all) {
|
||||
module.exports = function(request) {
|
||||
return github(request, owner, repo).then(function(all) {
|
||||
// if you need to do something special, you can do it here
|
||||
// ...
|
||||
return all;
|
||||
|
||||
@@ -20,7 +20,7 @@ npm install -g webi
|
||||
Mac & Linux:
|
||||
|
||||
```sh
|
||||
curl -fsS https://webinstall.dev/node | bash
|
||||
curl -fsS https://webinstall.dev/node | sh
|
||||
```
|
||||
|
||||
Windows (includes `curl.exe` and PowerShell by default):
|
||||
|
||||
@@ -22,7 +22,7 @@ if (/^win/i.test(os.platform())) {
|
||||
}
|
||||
|
||||
exec(
|
||||
'curl -fsS https://webinstall.dev/webi | bash',
|
||||
'curl -fsS https://webinstall.dev/webi | sh',
|
||||
function (err, stdout, stderr) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
|
||||
@@ -131,7 +131,7 @@ Releases.get(path.join(process.cwd(), pkgdir)).then(function (all) {
|
||||
console.info('Do the scripts actually work?');
|
||||
if (bashFile && bashTxt) {
|
||||
fs.writeFileSync(bashFile, bashTxt, 'utf-8');
|
||||
console.info('\tNEEDS MANUAL TEST: bash %s', bashFile);
|
||||
console.info('\tNEEDS MANUAL TEST: sh %s', bashFile);
|
||||
}
|
||||
if (ps1File && ps1Txt) {
|
||||
fs.writeFileSync(ps1File, ps1Txt, 'utf-8');
|
||||
|
||||
@@ -80,26 +80,26 @@ First, `fish` must be installed and in the `PATH`.
|
||||
|
||||
```sh
|
||||
# if you don't see a file path as output, fish is not in the path
|
||||
which fish
|
||||
command -v fish
|
||||
```
|
||||
|
||||
Second, fish must be in the system-approved list of shells in `/etc/shells`:
|
||||
|
||||
```sh
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
if ! grep $(which fish) /etc/shells > /dev/null; then
|
||||
sudo bash -c "echo '$(which fish)' >> /etc/shells";
|
||||
echo "added '$(which fish)' to /etc/shells"
|
||||
if ! grep $(command -v fish) /etc/shells > /dev/null; then
|
||||
sudo sh -c "echo '$(command -v fish)' >> /etc/shells";
|
||||
echo "added '$(command -v fish)' to /etc/shells"
|
||||
fi
|
||||
```
|
||||
|
||||
You should use `chsh` to change your shell:
|
||||
|
||||
```sh
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
sudo chsh -s "$(which fish)" "$(whoami)"
|
||||
sudo chsh -s "$(command -v fish)" "$(whoami)"
|
||||
```
|
||||
|
||||
If vim uses `fish` instead of `bash`, annoying errors will happen.
|
||||
@@ -116,7 +116,7 @@ You can also set is as the default for a particular Terminal, or for your user.
|
||||
Find out where `fish` is:
|
||||
|
||||
```sh
|
||||
which fish
|
||||
command -v fish
|
||||
```
|
||||
|
||||
Then update the Terminal preferences:
|
||||
@@ -131,7 +131,7 @@ Terminal > Preferences > General > Shells open with:
|
||||
Or, you can quit Terminal and change the preferences from the command line:
|
||||
|
||||
```sh
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
defaults write com.apple.Terminal "Shell" -string "$HOME/.local/bin/fish"
|
||||
```
|
||||
@@ -141,7 +141,7 @@ defaults write com.apple.Terminal "Shell" -string "$HOME/.local/bin/fish"
|
||||
Find out where `fish` is:
|
||||
|
||||
```sh
|
||||
which fish
|
||||
command -v fish
|
||||
```
|
||||
|
||||
Then update iTerm2 preferences:
|
||||
@@ -156,7 +156,7 @@ Custom Shell: /Users/YOUR_USER/.local/bin/fish
|
||||
Or, you can quit iTerm2 and change the preferences from the command line:
|
||||
|
||||
```sh
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
/usr/libexec/PlistBuddy -c "SET ':New Bookmarks:0:Custom Command' 'Custom Shell'" \
|
||||
~/Library/Preferences/com.googlecode.iterm2.plist
|
||||
@@ -194,7 +194,7 @@ shell:
|
||||
If you don't yet have an alacritty config, this will do:
|
||||
|
||||
```sh
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p ~/.config/alacritty
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ Run [gpg-pubkey-id](./gpg-pubkey) to get your GnuPG Public Key ID and then
|
||||
update your `~/.gitconfig` to sign with it by default:
|
||||
|
||||
```sh
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
MY_KEY_ID="$(
|
||||
gpg-pubkey-id
|
||||
|
||||
@@ -210,7 +210,7 @@ From macOS you can easily cross-compile cgo for Windows and Linux.
|
||||
Install [brew](https://webinstall.dev/brew), if needed:
|
||||
|
||||
```sh
|
||||
curl -sS https://webinstall.dev/brew | bash
|
||||
curl -sS https://webinstall.dev/brew | sh
|
||||
```
|
||||
|
||||
Install mingw and musl-cross: \
|
||||
|
||||
@@ -22,7 +22,7 @@ This installs two commands.
|
||||
The easiest way to get your GnuPG Public Key:
|
||||
|
||||
```sh
|
||||
curl https://webinstall.dev/gpg-pubkey | bash
|
||||
curl https://webinstall.dev/gpg-pubkey | sh
|
||||
```
|
||||
|
||||
This is what the output of `gpg-pubkey` looks like (except much longer):
|
||||
@@ -70,7 +70,7 @@ Run `gpg-pubkey-id` to get your GnuPG Public Key ID and then update your
|
||||
`~/.gitconfig` to sign with it by default:
|
||||
|
||||
```sh
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
MY_KEY_ID="$(
|
||||
gpg-pubkey-id
|
||||
@@ -107,7 +107,7 @@ Here's a command to list your secret key(s) and get the Public ID (of the first
|
||||
one, if you have many):
|
||||
|
||||
```sh
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
MY_KEY_ID="$(
|
||||
gpg --list-secret-keys --keyid-format LONG |
|
||||
@@ -188,7 +188,7 @@ Here's how you can automate creating a key using the same info as what's in your
|
||||
`~/.gitconfig`:
|
||||
|
||||
```sh
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
MY_NAME="$( git config --global user.name )"
|
||||
MY_HOST="$( hostname )"
|
||||
|
||||
@@ -58,7 +58,7 @@ Just add `koji --hook` to your project's `.git/hooks/prepare-commit-msg`:
|
||||
|
||||
```sh
|
||||
echo >> ./.git/hooks/prepare-commit-msg << "EOF"
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
koji --hook
|
||||
EOF
|
||||
|
||||
@@ -84,7 +84,7 @@ As a git hook:
|
||||
`.git/hooks/prepare-commit-msg`:
|
||||
|
||||
```sh
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
koji --emoji --hook
|
||||
```
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ tagline: |
|
||||
The easiest way to get your SSH Public Key:
|
||||
|
||||
```sh
|
||||
curl https://webinstall.dev/ssh-pubkey | bash
|
||||
curl https://webinstall.dev/ssh-pubkey | sh
|
||||
```
|
||||
|
||||
```txt
|
||||
|
||||
@@ -60,7 +60,7 @@ via `vim` with `:GoInstallBinaries`:
|
||||
printf ':GoInstallBinaries\n:q\n' | vim -e
|
||||
```
|
||||
|
||||
via `bash`:
|
||||
via `sh`:
|
||||
|
||||
```sh
|
||||
# gopls
|
||||
|
||||
@@ -27,10 +27,10 @@ Since `webi` is just a small helper script, it always updates on each use.
|
||||
You can install _exactly_ what you need, from memory, via URL:
|
||||
|
||||
```sh
|
||||
curl https://webinstall.dev/node@lts | bash
|
||||
curl https://webinstall.dev/node@lts | sh
|
||||
```
|
||||
|
||||
Or via `webi`, the tiny `curl | bash` shortcut command that comes with each
|
||||
Or via `webi`, the tiny `curl | sh` shortcut command that comes with each
|
||||
install:
|
||||
|
||||
```sh
|
||||
|
||||
Reference in New Issue
Block a user