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)" && TEMP_DEB="$(mktemp)" &&
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
sudo dpkg -i "$TEMP_DEB" sudo apt install "$TEMP_DEB"
else else
su -l -c "dpkg -i '$TEMP_DEB'" su -l -c "apt install '$TEMP_DEB'"
fi fi
rm -f "$TEMP_DEB" rm -f "$TEMP_DEB"
} }