mirror of
https://github.com/soywod/himalaya.git
synced 2024-11-21 18:40:19 +00:00
fix install.sh bin name
This commit is contained in:
parent
f6b2fa76b7
commit
5d352ae094
1 changed files with 6 additions and 7 deletions
13
install.sh
13
install.sh
|
@ -7,16 +7,15 @@ die() {
|
|||
exit "${2-1}"
|
||||
}
|
||||
|
||||
DESTDIR="${DESTDIR:-/}"
|
||||
DESTDIR="${DESTDIR:-}"
|
||||
PREFIX="${PREFIX:-"$DESTDIR/usr/local"}"
|
||||
RELEASES_URL="https://github.com/soywod/himalaya/releases"
|
||||
|
||||
system=$(uname -s | tr [:upper:] [:lower:])
|
||||
|
||||
case $system in
|
||||
msys*|mingw*|cygwin*|win*) system=windows;;
|
||||
linux|freebsd) system=linux;;
|
||||
darwin) system=macos;;
|
||||
msys*|mingw*|cygwin*|win*) system=windows; binary=himalaya.exe;;
|
||||
linux|freebsd) system=linux; binary=himalaya;;
|
||||
darwin) system=macos; binary=himalaya;;
|
||||
*) die "Unsupported system: $system" ;;
|
||||
esac
|
||||
|
||||
|
@ -31,6 +30,6 @@ echo "Installing binary…"
|
|||
tar -xzf "$tmpdir/himalaya.tar.gz" -C "$tmpdir"
|
||||
|
||||
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