mirror of
https://github.com/atuinsh/atuin.git
synced 2024-11-22 16:23:54 +01:00
fix(ubuntu/arm*): detect non amd64 ubuntu and handle (#1131)
If we're running Ubuntu on non-amd64 we get an install error. As there's no ARM package yet we can offer the user the option to install via cargo rather than install something that won't work.
This commit is contained in:
parent
0a3680f54c
commit
fbbe24da75
@ -64,10 +64,9 @@ __atuin_install_arch(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
__atuin_install_ubuntu(){
|
__atuin_install_ubuntu(){
|
||||||
|
if [ "$(dpkg --print-architecture)" = "amd64" ]; then
|
||||||
echo "Ubuntu detected"
|
echo "Ubuntu detected"
|
||||||
# TODO: select correct AARCH too
|
|
||||||
ARTIFACT_URL="https://github.com/atuinsh/atuin/releases/download/$LATEST_VERSION/atuin_${LATEST_VERSION//v/}_amd64.deb"
|
ARTIFACT_URL="https://github.com/atuinsh/atuin/releases/download/$LATEST_VERSION/atuin_${LATEST_VERSION//v/}_amd64.deb"
|
||||||
|
|
||||||
TEMP_DEB="$(mktemp)".deb &&
|
TEMP_DEB="$(mktemp)".deb &&
|
||||||
curl -Lo "$TEMP_DEB" "$ARTIFACT_URL"
|
curl -Lo "$TEMP_DEB" "$ARTIFACT_URL"
|
||||||
if command -v sudo &> /dev/null; then
|
if command -v sudo &> /dev/null; then
|
||||||
@ -76,6 +75,10 @@ __atuin_install_ubuntu(){
|
|||||||
su -l -c "apt install '$TEMP_DEB'"
|
su -l -c "apt install '$TEMP_DEB'"
|
||||||
fi
|
fi
|
||||||
rm -f "$TEMP_DEB"
|
rm -f "$TEMP_DEB"
|
||||||
|
else
|
||||||
|
echo "Ubuntu detected, but not amd64"
|
||||||
|
__atuin_install_unsupported
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
__atuin_install_linux(){
|
__atuin_install_linux(){
|
||||||
@ -148,7 +151,7 @@ __atuin_install_cargo(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
__atuin_install_unsupported(){
|
__atuin_install_unsupported(){
|
||||||
echo "Unknown or unsupported OS"
|
echo "Unknown or unsupported OS or architecture"
|
||||||
echo "Please check the README at https://github.com/atuinsh/atuin for manual install instructions"
|
echo "Please check the README at https://github.com/atuinsh/atuin for manual install instructions"
|
||||||
echo "If you have any problems, please open an issue!"
|
echo "If you have any problems, please open an issue!"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user