fix: modify install script for alpine
This commit is contained in:
parent
1ff09b814e
commit
5a6af17725
18
install.sh
18
install.sh
@ -58,7 +58,7 @@ Usage:
|
|||||||
- If Homebrew is not installed it will install the latest standalone release
|
- If Homebrew is not installed it will install the latest standalone release
|
||||||
into ~/.local
|
into ~/.local
|
||||||
|
|
||||||
- For FreeBSD, it will install the npm package with yarn or npm.
|
- For FreeBSD or Alpine, it will install the npm package with yarn or npm.
|
||||||
|
|
||||||
- If ran on an architecture with no releases, it will install the
|
- If ran on an architecture with no releases, it will install the
|
||||||
npm package with yarn or npm.
|
npm package with yarn or npm.
|
||||||
@ -238,6 +238,17 @@ main() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$OS" = "linux" ] && [ "$(distro)" = "alpine" ]; then
|
||||||
|
if [ "$METHOD" = standalone ]; then
|
||||||
|
echoerr "No precompiled releases available for alpine."
|
||||||
|
echoerr 'Please rerun without the "--method standalone" flag to install from npm.'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echoh "No precompiled releases available for alpine."
|
||||||
|
install_npm
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
CACHE_DIR="$(echo_cache_dir)"
|
CACHE_DIR="$(echo_cache_dir)"
|
||||||
|
|
||||||
if [ "$METHOD" = standalone ]; then
|
if [ "$METHOD" = standalone ]; then
|
||||||
@ -473,6 +484,11 @@ distro() {
|
|||||||
)
|
)
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/alpine-release ]; then
|
||||||
|
echo "alpine"
|
||||||
|
return
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# os_name prints a pretty human readable name for the OS/Distro.
|
# os_name prints a pretty human readable name for the OS/Distro.
|
||||||
|
Reference in New Issue
Block a user