1
1
mirror of https://github.com/ellie/atuin.git synced 2024-08-17 17:00:33 +03:00

Replace dpkg with apt (#248)

dpkg is a backend tool not supposed to be used by end users for installing debs.
Also apt installs potentials dependencies.
This commit is contained in:
Sandro 2021-12-19 11:13:13 +01:00 committed by GitHub
parent 88b2651ba4
commit d36ff138ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,9 +71,9 @@ __atuin_install_ubuntu(){
TEMP_DEB="$(mktemp)" &&
curl -Lo "$TEMP_DEB" "$ARTIFACT_URL"
if command -v sudo &> /dev/null; then
sudo dpkg -i "$TEMP_DEB"
sudo apt install "$TEMP_DEB"
else
su -l -c "dpkg -i '$TEMP_DEB'"
su -l -c "apt install '$TEMP_DEB'"
fi
rm -f "$TEMP_DEB"
}