Interactive script to update Gentoo install
Hello,
I recently reinstalled Gentoo on a new system and have decided to use an interactive script to do system updated. Please take a look and let me know if there are any improvements that can be make to it. Thnx. Code:
#/bin/bash |
You do not have to write 'echo' for every line.
Code:
read -p 'Update the Portage Tree? ' tree |
Thnx. That would make for less typing.
But because of the indents to the script I need to leave those echo's in there so everything lines up. Other then that, do I have all the bases covered? |
Quote:
and if it is doing everything that you want it to, then I'd say yes. Q: what ifs. what if you hit the wrong key then what happens? |
Thnx. I already know if any key but y is hit the script moves onto the next step in the process.
Code:
Update the Portage Tree? f |
basics covered, here's some further development ideas to consider. :)
could include overlay and eix stuff maybe. glsa stuff maybe too? like to give the option to only ugrade the glsa packages. also, i wondered about the questions being asked up front, bam bam bam bam bam, before anything happens, so it isnt left waiting for user interaction. so it would be as fast for the user saying "y" to the questions, as "n" (or other). ...and then even have an alternative answer to "y", where "a" for "ask" could still offer the chance to be asked before proceeding at some stage, like where what you might want to do might change depending on the outcome of the previous step. |
Quote:
Overlays... maybe. Haven't really looked into overlays as I am still new to gentoo and its workings Quote:
Quote:
I have stream-lined the script a bit and added color. When I get home tonight I'll post the new script. |
Here is what I have now:
Code:
#/bin/bash |
You miss the keep-going feature. Kinda annoying when portage stops on every package which breaks. like sdl2-mixer which is not fixed for over 2 weeks, open bugs for ages.
And depclean is dangerous. I would not recommend removing packages if you do not have to by a script depclean removes anything which is not related to the world file, and the world file itself, is a headache to keep it sane. why not emerge --sync; emerge --update --keep-going --deep -N world you can add that bdeps things, but i hardly ever add that i use emerge --sync; emerge -av --update --keep-going --deep -N world to see a list whats updated. that is also a decent point to uninstall software, change useflags, lookup useflags before you proceed. -- also i would not recommend to use etc-update by a script. that tool is broken in my point of view. the majority are just fresh config files, where most of the time i delete rm /etc/.... _cfg_0000_file_name. Never let a script touch the bootloader, grub.cfg or the /etc directory etc-update will overwrite your network password, and other user changed config files, so you loose functionality. never ever use it carelessly! it's more recommended to ignore the message about config files -- if you want to update your box and do not really care, add a cron job for that. not recommended but if you want to. also setting kernel symlink, x-server + nvidia-driver can render you in loss of x-server, direct rendering, so an autoupdate script is not recommended. gentoo has the habbit to provide kernels with not compatible nvidia-drivers. after 2 weeks you can update to a newer kernel branch usually after a new nvidia-driver is in the portage tree it also does not remove older kernels, older kernel modules, cleans up boot. -- i would not give the impression, that this update script fix everything for the newbie user. for the others its just enough to emerge --sync; emerge -av --update --keep-going --deep -N world |
Quote:
|
Honestly I just looked into your code, not in the text.
Thank you for your feedback. I think my one liner is more than enough for that purpose. |
All times are GMT -5. The time now is 10:09 AM. |