1 | #!/usr/bin/env bash
|
2 |
|
3 | # Hm this changes everything -- exit code is 1!
|
4 | #set -o errexit
|
5 |
|
6 | # Inspired by sources/download_functions.sh in Aboriginal:
|
7 |
|
8 | # wget -t 2 -T 20 -O "$SRCDIR/$FILENAME" "$1" ||
|
9 | # (rm -f "$SRCDIR/$FILENAME"; return 2)
|
10 |
|
11 | # This also causes a warning, but is not fatal.
|
12 | # bash gives a warning but mksh doesn't.
|
13 | echo SUBSHELL
|
14 | false || (rm -f foo; return 2)
|
15 |
|
16 | echo BREAK
|
17 | break
|
18 | echo CONTINUE
|
19 | continue
|
20 |
|
21 | echo RETURN
|
22 | # dash returns, bash warns that it's invalid.
|
23 | # mksh returns.
|
24 | return # This is like exit?
|
25 |
|
26 | # Bash gets here.
|
27 | echo DONE
|