install: fix posix compliance
This commit is contained in:
parent
1d8dd56e16
commit
16b7bfc86a
1 changed files with 6 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
install_dir="${PREFIX:-/usr/local}/bin"
|
install_dir="${PREFIX:-/usr/local}/bin"
|
||||||
|
|
@ -206,7 +206,7 @@ url="https://github.com/$repo/releases/download/$version/$filename.$ext"
|
||||||
|
|
||||||
tmp_path="$(mktemp -t -d "$(basename "$0").XXXXX")"
|
tmp_path="$(mktemp -t -d "$(basename "$0").XXXXX")"
|
||||||
|
|
||||||
if [ -z "$tmp_path" ] || [ "$tmp_path" == "/" ]; then
|
if [ -z "$tmp_path" ] || [ "$tmp_path" = "/" ]; then
|
||||||
echo "failed to create a temporary download directory"
|
echo "failed to create a temporary download directory"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
@ -220,11 +220,10 @@ die() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
trap die SIGINT
|
trap die INT
|
||||||
trap die SIGHUP
|
trap die HUP
|
||||||
trap die SIGTERM
|
trap die TERM
|
||||||
trap die SIGQUIT
|
trap die QUIT
|
||||||
trap die ERR
|
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
|
||||||
echo "downloading $title... to $tmp_path"
|
echo "downloading $title... to $tmp_path"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue