add some stuff

This commit is contained in:
Alexander Navarro 2023-04-20 18:06:24 -04:00
parent d93a470903
commit 0086e99679
5 changed files with 296 additions and 0 deletions

View file

@ -0,0 +1,23 @@
dnf-save-install() {
file="$DOTS/exports/dnf.txt"
echo "$*" >> "$file"
sort -u -o "$file" "$file"
sudo dnf install -y $(cat "$DOTS/exports/dnf.txt")
}
upgrade() {
sudo dnf upgrade --refresh -y
}
mayor-upgrade() {
if [[ $(dnf check-update -q) ]]; then
echo "There are updates pending, update and reboot? [y/N]"
read -r answer
if [[ $answer == 'y' || $answer == 'Y' ]]; then
upgrade
sc-reboot
fi
fi
}