LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Blogs > lazydog
User Name
Password

Notices


Rate this Entry

Interactive script to update gentoo install

Posted 06-28-2017 at 09:43 AM by lazydog

#/bin/bash

read -p 'Update the Portage Tree? ' tree

if [ "$tree" == "y" ]
then
echo '*******************************'
echo '*******************************'
echo '**'
echo '** UPDATING PORTAGE TREE'
echo '**'
echo '*******************************'
echo '*******************************'
echo
echo
eix-sync && \
echo
echo
fi

read -p 'Check Gentoo Security Advisories? ' glsa

if [ "$glsa" == "y" ]
then
echo '*******************************'
echo '*******************************'
echo '**'
echo '** SECURITY ADVISORIES'
echo '**'
echo '*******************************'
echo '*******************************'
echo
echo
glsa-check -l && \
echo
echo
fi

read -p 'Check System Updates? ' check

if [ "$check" == "y" ]
then
echo '*******************************'
echo '*******************************'
echo '**'
echo '** CHECKING SYSTEM UPDATES'
echo '**'
echo '*******************************'
echo '*******************************'
echo
echo
emerge --update --deep --pretend --with-bdeps=y @world && \
echo
echo
fi

read -p 'Porceed with System Updates? ' update

if [ "$update" == "y" ]
then
echo '*******************************'
echo '*******************************'
echo '**'
echo '** CHECKING SYSTEM UPDATES'
echo '**'
echo '*******************************'
echo '*******************************'
echo
echo
emerge --update --deep --with-bdeps=y @world && \
echo
echo
fi

read -p 'Remove Pckages No Longer Needed? ' cleanup

if [ "$cleanup" == "y" ]
then
echo '*******************************'
echo '*******************************'
echo '**'
echo '** REMOVING OLD PACKAGES'
echo '**'
echo '*******************************'
echo '*******************************'
echo
echo
emerge --ask --depclean && \
echo
echo
fi

read -p 'Update ETC Files? ' etc

if [ "$etc" == "y" ]
then
echo '*******************************'
echo '*******************************'
echo '**'
echo '** UPDATING ETC FILES'
echo '**'
echo '*******************************'
echo '*******************************'
echo
echo
etc-update && \
echo
echo
fi

echo
echo
echo '*******************************'
echo '*******************************'
echo '**'
echo '** SYSTEM UPDATE COMPLETE'
echo '**'
echo '*******************************'
echo '*******************************'
echo
echo
Posted in Uncategorized
Views 1639 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 03:19 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration