mirror of
https://github.com/soywod/himalaya.git
synced 2024-07-05 17:15:12 +00:00
fix install.sh bin name
This commit is contained in:
parent
f6b2fa76b7
commit
5d352ae094
13
install.sh
13
install.sh
|
@ -7,16 +7,15 @@ die() {
|
||||||
exit "${2-1}"
|
exit "${2-1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
DESTDIR="${DESTDIR:-/}"
|
DESTDIR="${DESTDIR:-}"
|
||||||
PREFIX="${PREFIX:-"$DESTDIR/usr/local"}"
|
PREFIX="${PREFIX:-"$DESTDIR/usr/local"}"
|
||||||
RELEASES_URL="https://github.com/soywod/himalaya/releases"
|
RELEASES_URL="https://github.com/soywod/himalaya/releases"
|
||||||
|
|
||||||
system=$(uname -s | tr [:upper:] [:lower:])
|
system=$(uname -s | tr [:upper:] [:lower:])
|
||||||
|
|
||||||
case $system in
|
case $system in
|
||||||
msys*|mingw*|cygwin*|win*) system=windows;;
|
msys*|mingw*|cygwin*|win*) system=windows; binary=himalaya.exe;;
|
||||||
linux|freebsd) system=linux;;
|
linux|freebsd) system=linux; binary=himalaya;;
|
||||||
darwin) system=macos;;
|
darwin) system=macos; binary=himalaya;;
|
||||||
*) die "Unsupported system: $system" ;;
|
*) die "Unsupported system: $system" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -31,6 +30,6 @@ echo "Installing binary…"
|
||||||
tar -xzf "$tmpdir/himalaya.tar.gz" -C "$tmpdir"
|
tar -xzf "$tmpdir/himalaya.tar.gz" -C "$tmpdir"
|
||||||
|
|
||||||
mkdir -p "$PREFIX/bin"
|
mkdir -p "$PREFIX/bin"
|
||||||
cp -f -- "$tmpdir/himalaya*" "$PREFIX/bin/"
|
cp -f -- "$tmpdir/$binary" "$PREFIX/bin/$binary"
|
||||||
|
|
||||||
die "$("$PREFIX/bin/himalaya" --version) installed!" 0
|
die "$("$PREFIX/bin/$binary" --version) installed!" 0
|
||||||
|
|
Loading…
Reference in a new issue