fix: use apt instead of dpkg #28
This commit is contained in:
+4
-3
@@ -33,6 +33,7 @@ sed 's/"browser_download_url": "//;s/"//g')
|
|||||||
|
|
||||||
TMP_DIR=$(mktemp -d)
|
TMP_DIR=$(mktemp -d)
|
||||||
DEB_PATH="${TMP_DIR}/$(basename "$DEB_URL")"
|
DEB_PATH="${TMP_DIR}/$(basename "$DEB_URL")"
|
||||||
|
chmod 755 "$TMP_DIR"
|
||||||
|
|
||||||
if [ -z "$DEB_URL" ]; then
|
if [ -z "$DEB_URL" ]; then
|
||||||
echo "Download url for .deb file not found."
|
echo "Download url for .deb file not found."
|
||||||
@@ -47,12 +48,12 @@ fi
|
|||||||
# Install the latest .deb package
|
# Install the latest .deb package
|
||||||
echo -e "\nInstalling the latest release..."
|
echo -e "\nInstalling the latest release..."
|
||||||
|
|
||||||
if ! command -v dpkg &> /dev/null; then
|
if ! command -v apt &> /dev/null; then
|
||||||
echo "Package manager dpkg was not found."
|
echo "Package manager apt was not found."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! sudo dpkg -i "$DEB_PATH"; then
|
if ! sudo apt install "$DEB_PATH"; then
|
||||||
echo "Installation of .deb file failed."
|
echo "Installation of .deb file failed."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user