fix: dash does not support pipefail
This commit is contained in:
parent
456675f9f3
commit
5a6957f134
|
@ -1,8 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# works best on busybox ash
|
## dash does not support pipefail
|
||||||
|
# this does not work in `dash script.sh`
|
||||||
set -efux -o pipefail
|
DASH=$(readlink -f "/bin/sh" | grep "dash" || [ $? = 1 ])
|
||||||
|
if [ -n "$DASH" ]; then
|
||||||
|
set -efx
|
||||||
|
else
|
||||||
|
set -efx -o pipefail
|
||||||
|
fi
|
||||||
|
|
||||||
alias curl="curl -L"
|
alias curl="curl -L"
|
||||||
alias mkdir="mkdir -p"
|
alias mkdir="mkdir -p"
|
||||||
|
|
Loading…
Reference in New Issue