silverblue-update icon indicating copy to clipboard operation
silverblue-update copied to clipboard

Allow modification when installing

Open boredsquirrel opened this issue 2 years ago • 2 comments
trafficstars

I currently really dont have time, but its very easy in bash to do yes/no or input dialogs.

It is nessecary for people to choose things like interval, when to apply, or others like if apply on boot.

while true; do
    read -p "Do you want that? (y/n) " yn
    case $yn in
        [Yy]* ) do something && break;;
        [Nn]* ) break;;
        * ) echo "Please answer yes or no.";;
    esac
done
read -p "How often do you want to do updates? " interval

echo $interval

And so on. I think you already know that stuff, just to make it quicker :smile:

From Fedora Docs

# run on the minute of every minute every hour of every day
 OnCalendar=*-*-* *:*:00
# run on the hour of every hour of every day
 OnCalendar=*-*-* *:00:00
# run every day
 OnCalendar=*-*-* 00:00:00
# run 11:12:13 of the first or fifth day of any month of the year
# 2012, but only if that day is a Thursday or Friday
 OnCalendar=Thu,Fri 2012-*-1,5 11:12:13

so like ask for every digit in the OnCalendar and then construct the thing e.g.

boredsquirrel avatar Mar 07 '23 19:03 boredsquirrel

Sorry! Rough week for me. I’ll look at your PR this weekend. Thanks for contributing!

tonywalker1 avatar Mar 10 '23 23:03 tonywalker1

Haha no problem. Good luck!

secretmango avatar Mar 13 '23 15:03 secretmango