Commit 9ba0eebf21dbb4863594eab67fa0e7d85a15c435
Use exit instead of return
Some shells don't allow return from a command groupcel committed on 5/17/2020, 7:38:17 PM
Parent: 67c0e15a98a66eb99db2251478505d6f3d37535c
Files changed
prelude/install.sh | changed |
prelude/install.sh | ||
---|---|---|
@@ -1,9 +1,9 @@ | ||
1 | 1 … | #!/bin/sh |
2 | 2 … | { |
3 | 3 … | blobs_base=${SSB_BLOBS_BASE:-http://localhost:8989/blobs/get/} |
4 | 4 … | |
5 | -system=$(uname -sm) || return 1 | |
5 … | +system=$(uname -sm) || exit 1 | |
6 | 6 … | case "$system" in |
7 | 7 … | %SWITCH_NODE_BLOBS% |
8 | 8 … | *) |
9 | 9 … | printf 'System not recognized: %s\n' "$system" >&2 |
@@ -15,9 +15,9 @@ | ||
15 | 15 … | exec 3<<EOF |
16 | 16 … | %SETTINGS% |
17 | 17 … | EOF |
18 | 18 … | |
19 | -tmp_dir=$(mktemp -d "${TMPDIR:-/tmp}/ssb-pkg.XXXXXXXXX") || return 1 | |
19 … | +tmp_dir=$(mktemp -d "${TMPDIR:-/tmp}/ssb-pkg.XXXXXXXXX") || exit 1 | |
20 | 20 … | node_bin="$tmp_dir/ssb-pkg-node-$$" |
21 | 21 … | install_js="$tmp_dir/ssb-pkg-install-$$" |
22 | 22 … | |
23 | 23 … | while ! for id; do |
@@ -30,6 +30,6 @@ | ||
30 | 30 … | do sleep 1; done |
31 | 31 … | "$node_bin" "$install_js" |
32 | 32 … | rc=$? |
33 | 33 … | rm -rf "$tmp_dir" |
34 | -return $rc | |
34 … | +exit $rc | |
35 | 35 … | } |
Built with git-ssb-web