Change apt to dnf

This commit is contained in:
2024-03-29 13:06:27 +08:00
parent e5c1bba6a6
commit ddec4491fd

View File

@@ -3,7 +3,7 @@
# tested on os-release 9,3 # tested on os-release 9,3
APP_DIR="$(dirname "$0")" APP_DIR="$(dirname "$0")"
echo "Run an apt update" echo "Run a dnf update"
if sudo -l dnf > /dev/null; then if sudo -l dnf > /dev/null; then
sudo dnf check-update sudo dnf check-update
else else
@@ -11,7 +11,7 @@ else
fi fi
echo "Install git and friends" echo "Install git and friends"
if sudo -l apt > /dev/null; then if sudo -l dnf > /dev/null; then
sudo dnf install -y git sudo dnf install -y git
else else
echo "Unable to autoinstall git and friends, please install manually" echo "Unable to autoinstall git and friends, please install manually"
@@ -70,7 +70,7 @@ done
IFS="$OLDIFS" IFS="$OLDIFS"
echo "Install vim and friends" echo "Install vim and friends"
if sudo -l apt > /dev/null; then if sudo -l dnf > /dev/null; then
sudo dnf install -y vim-enhanced sudo dnf install -y vim-enhanced
else else
echo "Unable to autoinstall vim and friends, please install manually" echo "Unable to autoinstall vim and friends, please install manually"