Hey people!
I started scripting a few days ago and now i wanna write a script for updating my system with zypper.
But i'm having some troubles. Loading the repositories and refreshing them works, but now i want that
zypper shows me the available updates. And then if there are no new updates you can exit by pressing
ENTER or you press ENTER and update what has to be updated.
My problem now is how do i get the value of zypper -list-updates for the if-condition?
it should look something like:
if[zypper -lu == "no updates"]
then
with the red marked thing i have a problem.
i'm glad for every kind of help
cheers
I started scripting a few days ago and now i wanna write a script for updating my system with zypper.
But i'm having some troubles. Loading the repositories and refreshing them works, but now i want that
zypper shows me the available updates. And then if there are no new updates you can exit by pressing
ENTER or you press ENTER and update what has to be updated.
My problem now is how do i get the value of zypper -list-updates for the if-condition?
it should look something like:
if[zypper -lu == "no updates"]
then
echo "no updates"
elsezypper update
fiwith the red marked thing i have a problem.
i'm glad for every kind of help
cheers