git ssb

0+

cel-desktop / ssb-pkg



Commit 9ba0eebf21dbb4863594eab67fa0e7d85a15c435

Use exit instead of return

Some shells don't allow return from a command group
cel committed on 5/17/2020, 7:38:17 PM
Parent: 67c0e15a98a66eb99db2251478505d6f3d37535c

Files changed

prelude/install.shchanged
prelude/install.shView
@@ -1,9 +1,9 @@
11 #!/bin/sh
22 {
33 blobs_base=${SSB_BLOBS_BASE:-http://localhost:8989/blobs/get/}
44
5-system=$(uname -sm) || return 1
5 +system=$(uname -sm) || exit 1
66 case "$system" in
77 %SWITCH_NODE_BLOBS%
88 *)
99 printf 'System not recognized: %s\n' "$system" >&2
@@ -15,9 +15,9 @@
1515 exec 3<<EOF
1616 %SETTINGS%
1717 EOF
1818
19-tmp_dir=$(mktemp -d "${TMPDIR:-/tmp}/ssb-pkg.XXXXXXXXX") || return 1
19 +tmp_dir=$(mktemp -d "${TMPDIR:-/tmp}/ssb-pkg.XXXXXXXXX") || exit 1
2020 node_bin="$tmp_dir/ssb-pkg-node-$$"
2121 install_js="$tmp_dir/ssb-pkg-install-$$"
2222
2323 while ! for id; do
@@ -30,6 +30,6 @@
3030 do sleep 1; done
3131 "$node_bin" "$install_js"
3232 rc=$?
3333 rm -rf "$tmp_dir"
34-return $rc
34 +exit $rc
3535 }

Built with git-ssb-web