tiny bash update script

Anything that pertains to Entropy, Equo or Sulfur

Moderator: Moderators

tiny bash update script

Postby batvink » Wed Aug 03, 2011 18:59

i wrote a tiny bash script, that fully updates the system,
using Entropy as package manager.
But it's also syncing the Portage tree, eix-database, and mlocate;
Assumed that they're installed.

The script must be run as root,
and it's not ment for daily usage., say: once a week?
I know, it's not necessarily, 'cause we have magneto, the update notifier.
i just made it for fun.
so for those who are interested:
http://pastebin.sabayon.org/pastie/6766
feel free to change the script.

I ran it on my own system, and here's the output so you can see what it actually does:
(since i'm from the Netherlands, the output is in Dutch)
Code: Select all
bwg-inc aposteeltje # ./update.sh





    ***************************************************
    * This script is made to FULLY update the system, *
    *     using ENTROPY as main package manager.      *
    *  Also, syncing the Portage tree, eix-database,  *
    *  and mlocate. Assumed that they're installed..  *
    ***************************************************

Content of this script:

- update entropy repository
- upgrade Entropy to latest version
- upgrade the system, using 'equo upgrade --ask --verbose'
- searching for security updates and apply them
- Syncing the portage tree
- Syncing all added overlay's
- updating the EIX database
- updating the mlocate database
- doing a libtest & deptest
- cleanup packages
- check if configuration files need to be updated


you can cancel this script now, just hit 'CTRL-C' to abort, or
press any key to continue...
h











UPDATING ENTROPY REPOSITORY...
******************************
>>  @@ Repositories synchronisatie ...
>>   # No description
>>   # Repositorie URL: http://pkg.sabayon.org/standard/sabayonlinux.org/database/amd64/5
>>   # Repositorie lokaal pad: /var/lib/entropy/client/database/amd64/sabayonlinux.org/standard/amd64/5
>>   # Repositorie API: 3
>>      Attentie: Repositories was reeds up to date.
>>  @@  Notitie Bord: sabayonlinux.org
>>     [0] [Thu, 23 Jun 2011 21:37:56 +0000] Titel: Sabayon 6 release migration note

UPGRADING ENTROPY TO LATEST VERSION...
**************************************
>>  @@ Berekenen van afhankelijkheden ...
>>  ## [R] [sabayonlinux.org] app-admin/equo-1.0_rc27|0   [1.0_rc27|0]
>>  ## [R] [sabayonlinux.org] sys-apps/entropy-1.0_rc27|0   [1.0_rc27|0]
>>  ## [R] [sabayonlinux.org] app-admin/sulfur-1.0_rc27|0   [1.0_rc27|0]
>>  @@ Pakketten die moeten worden geinstalleerd/geupdate/gedowngrade: 3
>>  @@ Pakketten die moeten worden verwijderd: 0
>>  @@ Download grootte: 1.2MB
>>  @@ Vrijgemaakte schijfruimte: 0.0b
>>  @@ Je hebt minimaal nodig: 2.3MB aan vrije ruimte
>>  :: (1/1) >>> 3 Pakketten
>>    ## Downloaden: 3 archieven
>>    ## ( mirror #1 ) [app-admin:equo-1.0_rc27~0.tbz2] @ ftp://ftp.nluug.nl
>>    ## ( mirror #1 ) [sys-apps:entropy-1.0_rc27~0.tbz2] @ ftp://ftp.nluug.nl
>>    ## ( mirror #1 ) [app-admin:sulfur-1.0_rc27~0.tbz2] @ ftp://ftp.nluug.nl
>>   ## Geaggregeerde download: 3 Items
>>    # [1] ftp.nluug.nl => app-admin:equo-1.0_rc27~0.tbz2
>>    # [2] ftp.nluug.nl => sys-apps:entropy-1.0_rc27~0.tbz2
>>    # [3] ftp.nluug.nl => app-admin:sulfur-1.0_rc27~0.tbz2
>>    ## ( mirror #1 ) [app-admin:equo-1.0_rc27~0.tbz2] succesvol @ ftp://ftp.nluug.nl
>>    ## ( mirror #1 ) [sys-apps:entropy-1.0_rc27~0.tbz2] succesvol @ ftp://ftp.nluug.nl
>>    ## ( mirror #1 ) [app-admin:sulfur-1.0_rc27~0.tbz2] succesvol @ ftp://ftp.nluug.nl
>>    ##  Geaggregeerde overdracht snelheid: 1.3MB/seconde
>>    ## Pakket controlesom komt overeen: app-admin:equo-1.0_rc27~0.tbz2
>>       : GPG overeenkomsten
>>       : SHA1 overeenkomsten
>>       : SHA256 Uitgeschakeld
>>       : SHA512 Uitgeschakeld
>>    ## Pakket controlesom komt overeen: sys-apps:entropy-1.0_rc27~0.tbz2
>>       : GPG overeenkomsten
>>       : SHA1 overeenkomsten
>>       : SHA256 Uitgeschakeld
>>       : SHA512 Uitgeschakeld
>>    ## Pakket controlesom komt overeen: app-admin:sulfur-1.0_rc27~0.tbz2
>>       : GPG overeenkomsten
>>       : SHA1 overeenkomsten
>>       : SHA256 Uitgeschakeld
>>       : SHA512 Uitgeschakeld
>>  ++ (1/3) >>> app-admin/equo-1.0_rc27
>>    ## Pakket uitpakken: app-admin:equo-1.0_rc27~0.tbz2
>>    ## Pakket Installeren: app-admin/equo-1.0_rc27
>>    ## [Official Sabayon Linux Package Manager Client]
>>    ## Database actualiseren: app-admin/equo-1.0_rc27
>>    ## Opruimen van voorheen geinstalleerde applicatie data
>>    ## SPM: Post-Verwijder fase
>>> Regenerating /etc/ld.so.cache...
>>    ## SPM: Post-installeer fase
 * Package:    app-admin/equo-1.0_rc27
 * Repository: sabayon
 * USE:        amd64 bash-completion elibc_glibc kernel_linux multilib userland_GNU
 * FEATURES:   preserve-libs sandbox splitdebug
 * Compilation and optimization of Python modules placed outside of site-packages directories for CPython 2.7 ...     [ ok ]
 * The following bash-completion scripts have been installed:
 *      equo
 *
 * To enable command-line completion on a per-user basis run:
 *      eselect bashcomp enable <script>
 *
 * To enable command-line completion system-wide run:
 *      eselect bashcomp enable --global <script>

 * If you would like to allow users in the 'entropy' group
 * to update available package repositories, please consider
 * to install sys-apps/entropy-client-services

>>    ## Opruimen: app-admin/equo-1.0_rc27
>>  ++ (2/3) >>> sys-apps/entropy-1.0_rc27
>>    ## Pakket uitpakken: sys-apps:entropy-1.0_rc27~0.tbz2
>>    ## SPM: setup phase
 * Package:    sys-apps/entropy-1.0_rc27
 * Repository: sabayon
 * USE:        amd64 elibc_glibc kernel_linux multilib userland_GNU
 * FEATURES:   preserve-libs sandbox splitdebug
>>    ## Pakket Installeren: sys-apps/entropy-1.0_rc27
>>    ## [Official Sabayon Linux Package Manager library]
>>    ## Database actualiseren: sys-apps/entropy-1.0_rc27
>>    ## Opruimen van voorheen geinstalleerde applicatie data
>>    ## SPM: Post-Verwijder fase
>>> Regenerating /etc/ld.so.cache...
>>    ## SPM: Post-installeer fase
 * Purging current Entropy cache
 * Compilation and optimization of Python modules placed outside of site-packages directories for CPython 2.7 ...     [ ok ]
Switching to python2.7

 * Entropy packages cache has been moved to a more NFS-friendly location:
 *   /var/lib/entropy/client/packages/packages{-restricted,-nonfree,}
 * PLEASE make sure to update your mount points ASAP.

 * If you want to enable Entropy packages delta download support, please
 * install dev-util/bsdiff.

>>    ## Opruimen: sys-apps/entropy-1.0_rc27
>>  ++ (3/3) >>> app-admin/sulfur-1.0_rc27
>>    ## Pakket uitpakken: app-admin:sulfur-1.0_rc27~0.tbz2
>>    ## Pakket Installeren: app-admin/sulfur-1.0_rc27
>>    ## [Sulfur, the Entropy Store (Sabayon Package Manager GUI)]
>>    ## Database actualiseren: app-admin/sulfur-1.0_rc27
>>    ## Opruimen van voorheen geinstalleerde applicatie data
>>    ## SPM: Post-Verwijder fase
>>> Regenerating /etc/ld.so.cache...
>>    ## SPM: Post-installeer fase
 * Package:    app-admin/sulfur-1.0_rc27
 * Repository: sabayon
 * USE:        amd64 elibc_glibc kernel_linux multilib userland_GNU
 * FEATURES:   preserve-libs sandbox splitdebug
 * Updating shared mime info database ...
 * Updating desktop mime database ...
 * Compilation and optimization of Python modules placed outside of site-packages directories for CPython 2.7 ...     [ ok ]
>>    ## Opruimen: app-admin/sulfur-1.0_rc27
>>  @@ Installatie voltooid.
>>  @@ Configuratie bestanden scan compleet.
>>  @@ Scannen van bestandssysteem ...
>> 't Zit goed schat. Niets te doen!
>>  @@ Repositories synchronisatie ...
>>   # No description
>>   # Repositorie URL: http://pkg.sabayon.org/standard/sabayonlinux.org/database/amd64/5
>>   # Repositorie lokaal pad: /var/lib/entropy/client/database/amd64/sabayonlinux.org/standard/amd64/5
>>   # Repositorie API: 3
>>      Attentie: Repositories was reeds up to date.
>>  @@  Notitie Bord: sabayonlinux.org
>>     [0] [Thu, 23 Jun 2011 21:37:56 +0000] Titel: Sabayon 6 release migration note

UPGRADING THE SYSTEM...
***********************
>>  @@ Calculeren van Systeem Updates...
>>  @@ 0 => Overeenkomende pakketten voor update
>>  @@ 2 => Overeenkomende pakketten zijn niet beschikbaar
>>  @@ 1649 => Overeenkomende pakketten zijn reeds bijgewerkt
>>  @@ Niets te updaten.
>>  @@ Op het systeem zijn pakketten aangetroffen die niet meer beschikbaar zijn op de online repositories.
>>  @@ Zelfs al zijn ze onschadelijk, het is aangeraden om ze te verwijderen.
>>  @@ Dit zijn de pakketten die HANDMATIG verwijderd moeten worden:
>>  ## [spm-db] www-client/chromium-9999-r1 [68.2MB]
>>  ## [spm-db] app-admin/superadduser-1.0.9 [65.2kB]
>>  @@ Niets te verwijderen.
>>  @@ Configuratie bestanden scan compleet.

APPLYING SECURITY UPDATES...
****************************
>>  @@ Beveiligings Adviesen: service connecties worden getest ...
>>  @@ Beveiligings Adviesen: laatste adviezen binnen halen ...
>>  @@ Beveiligings Adviesen: is reeds bijgewerkt.
>>  @@ Berekenen beveiliging Updates...
>>  @@ Berekenen van afhankelijkheden ...
>>  ## [R] [sabayonlinux.org] media-libs/libpng-1.2.44|0   [1.2.44|0]
>>  @@ Pakketten die moeten worden geinstalleerd/geupdate/gedowngrade: 1
>>  @@ Pakketten die moeten worden verwijderd: 0
>>  @@ Download grootte: 85.7kB
>>  @@ Vrijgemaakte schijfruimte: 0.0b
>>  @@ Je hebt minimaal nodig: 171.5kB aan vrije ruimte
>>  :: (1/1) >>> 1 Pakketten
>>    ## Downloaden: 1 archieven
>>    ## ( mirror #1 ) [media-libs:libpng-1.2.44~0.tbz2] @ ftp://ftp.nluug.nl
>>   ## Geaggregeerde download: 1 Items
>>    # [1] ftp.nluug.nl => media-libs:libpng-1.2.44~0.tbz2
>>    ## ( mirror #1 ) [media-libs:libpng-1.2.44~0.tbz2] succesvol @ ftp://ftp.nluug.nl
>>    ##  Geaggregeerde overdracht snelheid: 266.6kB/seconde
>>    ## Pakket controlesom komt overeen: media-libs:libpng-1.2.44~0.tbz2
>>       : GPG overeenkomsten
>>       : SHA1 overeenkomsten
>>       : SHA256 Uitgeschakeld
>>       : SHA512 Uitgeschakeld
>>  ++ (1/1) >>> media-libs/libpng-1.2.44
>>    ## Pakket uitpakken: media-libs:libpng-1.2.44~0.tbz2
>>    ## SPM: setup phase
 * Package:    media-libs/libpng-1.2.44
 * Repository: gentoo
 * USE:        amd64 elibc_glibc kernel_linux multilib userland_GNU
 * FEATURES:   preserve-libs sandbox splitdebug
>>    ## Pakket Installeren: media-libs/libpng-1.2.44
>>    ## [Portable Network Graphics library]
>>    ## Database actualiseren: media-libs/libpng-1.2.44
>>    ## Opruimen van voorheen geinstalleerde applicatie data
>>> Regenerating /etc/ld.so.cache...
>>    ## Opruimen: media-libs/libpng-1.2.44
>>  @@ Installatie voltooid.

SYNCING PORTAGE TREE...
***********************
>>> Starting rsync with rsync://88.198.224.205/gentoo-portage...
>>> Checking server timestamp ...
timed out
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(549) [Receiver=3.0.8]
>>> Retrying...


>>> Starting retry 1 of 24 with rsync://88.191.100.68/gentoo-portage
>>> Checking server timestamp ...
                                       _       _
http://modulix.org                     \_\__  _\_\
 http://modulix.net                       \_\_\_\
  http://modulix.com                        _\_\__
    33000 Bordeaux                         _\_\ \_\__
     webmaster@modulix.net                 \_\     \_\

rsync4.fr.gentoo.org - gentoo.modulix.net (88.191.100.68)
GNU/Linux-Gentoo 2.6.36-gentoo-r3 - i686 Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz
RAM : 2Go - BogoMIPS : 8673.80
HD : 2 x 460 Go
Internet : 100 Mbits/sec

Portage faisait 640 Mo le 03/08/2011 à 18:00 :
- Distfiles/ebuilds : 58346/27961
- Packages/catégories : 15130/154

receiving incremental file list
timestamp.chk

Number of files: 1
Number of files transferred: 1
Total file size: 32 bytes
Total transferred file size: 32 bytes
Literal data: 32 bytes
Matched data: 0 bytes
File list size: 27
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 98
Total bytes received: 774

sent 98 bytes  received 774 bytes  581.33 bytes/sec
total size is 32  speedup is 0.04
                                       _       _
http://modulix.org                     \_\__  _\_\
 http://modulix.net                       \_\_\_\
  http://modulix.com                        _\_\__
    33000 Bordeaux                         _\_\ \_\__
     webmaster@modulix.net                 \_\     \_\

rsync4.fr.gentoo.org - gentoo.modulix.net (88.191.100.68)
GNU/Linux-Gentoo 2.6.36-gentoo-r3 - i686 Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz
RAM : 2Go - BogoMIPS : 8673.80
HD : 2 x 460 Go
Internet : 100 Mbits/sec

Portage faisait 640 Mo le 03/08/2011 à 18:00 :
- Distfiles/ebuilds : 58346/27961
- Packages/catégories : 15130/154

receiving incremental file list
./
app-accessibility/
app-accessibility/accerciser/
app-accessibility/dasher/
app-accessibility/espeak/
app-accessibility/festival-freebsoft-utils/
app-accessibility/festival-it/
app-accessibility/gok/
app-accessibility/mbrola/
app-accessibility/morseall/
app-accessibility/orca/
app-accessibility/perlbox-voice/
app-accessibility/pidgin-festival/
app-accessibility/sound-icons/
app-accessibility/speakup-utils/
app-accessibility/speech-dispatcher/
app-accessibility/sphinx3/
app-admin/
app-admin/389-admin-console/
app-admin/bastille/
app-admin/chef-server/
app-admin/chrootuid/
app-admin/diradm/
app-admin/eselect-ctags/

(this would be TOO long, so i cut it here...)

xfce-extra/
xfce-extra/thunar-archive-plugin/
xfce-extra/thunar-vcs-plugin/
xfce-extra/thunar-vfs/
xfce-extra/thunar-volman/
xfce-extra/xfce4-appfinder/
xfce-extra/xfce4-cpugraph-plugin/
xfce-extra/xfce4-dict/
xfce-extra/xfce4-diskperf-plugin/
xfce-extra/xfce4-eyes-plugin/
xfce-extra/xfce4-mixer/
xfce-extra/xfce4-mpc-plugin/
xfce-extra/xfce4-netload-plugin/
xfce-extra/xfce4-notifyd/
xfce-extra/xfce4-radio-plugin/
xfce-extra/xfce4-systemload-plugin/
xfce-extra/xfce4-taskmanager/
xfce-extra/xfce4-verve-plugin/
xfce-extra/xfce4-volumed/
xfce-extra/xfce4-wavelan-plugin/
xfce-extra/xfce4-weather-plugin/
xfce-extra/xfce4-xkb-plugin/

Number of files: 144284
Number of files transferred: 92
Total file size: 207200179 bytes
Total transferred file size: 883507 bytes
Literal data: 883507 bytes
Matched data: 0 bytes
File list size: 3578651
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 41941
Total bytes received: 3948427

sent 41941 bytes  received 3948427 bytes  59116.56 bytes/sec
total size is 207200179  speedup is 51.93

 * An update to portage is available. It is _highly_ recommended
 * that you update portage now, before any other packages are updated.

 * To update portage, run 'emerge portage' now.


 * IMPORTANT: 6 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.


SYNCING OVERLAY'S...
********************
* Running... # ( cd /var/lib/layman/sabayon  && /usr/bin/git pull )
remote: Counting objects: 25, done.
remote: Compressing objects: 100% (19/19), done.

remote: Total 19 (delta 11), reused 0 (delta 0)
Unpacking objects: 100% (19/19), done.
From git://sabayon.org/projects/overlay
   ef7f1d0..7ade2d6  master     -> origin/master
Updating ef7f1d0..7ade2d6
Fast-forward
 lxde-base/lxdm/Manifest                            |    4 ++--
 .../lxdm/files/lxdm-0.4.1-sabayon-6-theme.patch    |    6 +++---
 .../{lxdm-0.4.1.ebuild => lxdm-0.4.1-r1.ebuild}    |    4 ++++
 3 files changed, 9 insertions(+), 5 deletions(-)
 rename lxde-base/lxdm/{lxdm-0.4.1.ebuild => lxdm-0.4.1-r1.ebuild} (94%)
* Running... # ( cd /var/lib/layman/kde  && /usr/bin/git pull )
Already up-to-date.
* Running... # ( cd /var/lib/layman/stuff  && /usr/bin/git pull )
Already up-to-date.
* Running... # ( cd /var/lib/layman/desktop-effects  && /usr/bin/git pull )
Already up-to-date.
*
* Success:
* ------
*
* Successfully synchronized overlay "sabayon".
* Successfully synchronized overlay "kde".
* Successfully synchronized overlay "stuff".
* Successfully synchronized overlay "desktop-effects".

UPDATING EIX DATABASE...
************************
Reading Portage settings ..
Building database (/var/cache/eix) ..
[0] "gentoo" /usr/portage/ (cache: metadata-flat)
     Reading category 155|155 (100%) Finished             
[1] "sabayon" /var/lib/layman/sabayon (cache: parse|ebuild*#metadata-flat#assign)
     Reading category 155|155 (100%) Finished           
[2] "desktop-effects" /var/lib/layman/desktop-effects (cache: parse|ebuild*#metadata-flat#assign)
     Reading category 144|155 ( 92%): x11-apps .. *
 * "/var/lib/layman/desktop-effects/x11-apps/simple-ccsm/simple-ccsm-9999.ebuild":
 * Deprecation Warning: Usage of distutils.eclass in packages not supporting installation
 * for multiple Python ABIs in EAPI <=2 is deprecated and will be banned on 2011-06-01.
 * The ebuild needs to be fixed. Please report a bug, if it has not been already reported.
 *
     Reading category 149|155 ( 96%): x11-plugins .. *
 * "/var/lib/layman/desktop-effects/x11-plugins/screenlets/screenlets-0.1.2.ebuild":
 * Deprecation Warning: Usage of distutils.eclass in packages not supporting installation
 * for multiple Python ABIs in EAPI <=2 is deprecated and will be banned on 2011-06-01.
 * The ebuild needs to be fixed. Please report a bug, if it has not been already reported.
 *
     Reading category 155|155 (100%) Finished       
[3] "stuff" /var/lib/layman/stuff (cache: parse|ebuild*#metadata-flat#assign)
     Reading category 155|155 (100%) Finished         
[4] "kde" /var/lib/layman/kde (cache: parse|ebuild*#metadata-flat#assign)
     Reading category 155|155 (100%) Finished       
Applying masks ..
Calculating hash tables ..
Writing database file /var/cache/eix ..
Database contains 15470 packages in 155 categories.

UPDATING MLOCATE DATABASE...
****************************
mlocate database is updated

DOING A LIBTEST & DEPTEST
*************************
>>  @@ Bibliotheken test
>>  @@ afwijzen van map: /usr/lib64, omdat hij gekoppeld is aan: /usr/lib
>>  @@ afwijzen van map: /lib64, omdat hij gekoppeld is aan: /lib
>>  @@ Opzoeken van beschadigde opstartbestanden
>>  @@ Attentie: maak je geen zorgen over bibliotheken die hier worden getoond maar niet later.
>>    (33.5%) /usr/bin/php-cgi [ libpq.so.5 ]
>>    (50.9%) /usr/lib/php5.3/bin/php [ libpq.so.5 ]
>>    (54.9%) /usr/bin/php [ libpq.so.5 ]
>>    (57.4%) /usr/lib/php5.3/bin/php-cgi [ libpq.so.5 ]
>>    (63.7%) /usr/lib/php5.3/bin/php-fpm [ libpq.so.5 ]
>>    (72.1%) /usr/lib/python2.7/site-packages/pyanaconda/_isys.so [ libnm-glib.so.4 :: libnm-util.so.2 ]
>>    (74.9%) /usr/bin/php-fpm [ libpq.so.5 ]
>>    (88.0%) /usr/bin/pulsestop [ libpulsecommon-0.9.22.so :: libpulsecore-0.9.22.so :: libxcb-atom.so.1 ]
>>  @@ vergelijken van gebroken bibliotheken/opstartbestanden
>>  @@ Statistieken van Bibliotheken/Opstartbestanden:
>>  ## Niet overeenkomend:
>>     => /usr/bin/pulsestop
>>  @@ Start afhankelijkheids test ...
>>  @@  (1652/1652) Checken kde-base/ksnapshot-4.6.5

CLEAN-UP PACKAGES
*****************
>> Opgeruimd: 3 bestanden en mappen

CHECK FOR CONFIGURATION FILES, NEEDING TO GET UPDATED
*****************************************************
>>  @@ Scannen van bestandssysteem ...
>> 't Zit goed schat. Niets te doen!


your system is up to date.
you can close this shell session...
bwg-inc aposteeltje #
Latest (important) news about sabayon?
Watch Rigo's notice board, or surf to:
https://wiki.sabayon.org/index.php?title=Wiki_News
User avatar
batvink
Technological Hen
 
Posts: 405
Joined: Sun Oct 28, 2007 11:44
Location: the netherlands

Re: tiny bash update script

Postby sqlpython » Wed Aug 03, 2011 21:20

Very Nice.. :)
Thanks for sharing.
Sabayon is my one Gentoo type indulgence I am almost entirely a .tar/compile or a .deb user for years.
If someone, such as Joost, would examine the script, I would like to try it.
Criticism accepted for Solutions that work. ;^)
Sabayon 11-DEBIAN 7-#Sid-Slackware 14-Calculate 13-
User avatar
sqlpython
Technological Hen
 
Posts: 324
Joined: Mon Jun 18, 2007 7:01
Location: If It Moves Compile It

Re: tiny bash update script

Postby batvink » Thu Aug 04, 2011 4:41

they're just common commands like: 'equo update' and 'emerge --sync' and so on.
It's not abracadabra.. :-)
the second line of the script, right after '#!/bin/bash, implements an abort, invoked by hitting 'CTRL-C'
It means that you can cancel the script at any time.
Line 30 implements a pause, and waits 'till the user presses any key to continue the script. and even at that time, you can abort with 'CTRL-C'
script:
Code: Select all
#!/bin/bash
trap "kill 0" 2
# init
clear
echo ""
echo ""
echo "    ***************************************************"
echo "    * This script is made to FULLY update the system, *"
echo "    *     using ENTROPY as main package manager.      *"
echo "    *  Also, syncing the Portage tree, eix-database,  *"
echo "    *  and mlocate. Assumed that they're installed..  *"
echo "    ***************************************************"
echo ""
echo "Content of this script:"
echo ""
echo "- update entropy repository"
echo "- upgrade Entropy to latest version"
echo "- upgrade the system, using 'equo upgrade --ask --verbose'"
echo "- searching for security updates and apply them"
echo "- Syncing the portage tree"
echo "- Syncing all added overlay's"
echo "- updating the EIX database"
echo "- updating the mlocate database"
echo "- doing a libtest & deptest"
echo "- cleanup packages"
echo "- check if configuration files need to be updated"
echo ""
echo ""
echo "you can cancel this script now, just hit 'CTRL-C' to abort, or"
read -n 1 -p 'press any key to continue...'
clear
echo "UPDATING ENTROPY REPOSITORY..."
echo "******************************"
equo update
echo ""
echo "UPGRADING ENTROPY TO LATEST VERSION..."
echo "**************************************"
equo install entropy sulfur equo --relaxed
equo conf update
equo update
echo ""
echo "UPGRADING THE SYSTEM..."
echo "***********************"
equo upgrade --ask --verbose
echo ""
echo "APPLYING SECURITY UPDATES..."
echo "****************************"
equo security update && equo security install
echo ""
echo "SYNCING PORTAGE TREE..."
echo "***********************"
emerge --sync
echo ""
echo "SYNCING OVERLAY'S..."
echo "********************"
layman -S
echo ""
echo "UPDATING EIX DATABASE..."
echo "************************"
eix-update
echo ""
echo "UPDATING MLOCATE DATABASE..."
echo "****************************"
updatedb
echo "mlocate database is updated"
echo ""
echo "DOING A LIBTEST & DEPTEST"
echo "*************************"
equo libtest && equo deptest
echo ""
echo "CLEAN-UP PACKAGES"
echo "*****************"
equo cleanup
echo ""
echo "CHECK FOR CONFIGURATION FILES, NEEDING TO GET UPDATED"
echo "*****************************************************"
equo conf update
echo ""
echo ""
echo "your system is up to date."
echo "you can close this shell session..."
Latest (important) news about sabayon?
Watch Rigo's notice board, or surf to:
https://wiki.sabayon.org/index.php?title=Wiki_News
User avatar
batvink
Technological Hen
 
Posts: 405
Joined: Sun Oct 28, 2007 11:44
Location: the netherlands

Re: tiny bash update script

Postby sqlpython » Thu Aug 04, 2011 21:06

they're just common commands like: 'equo update' and 'emerge --sync' and so on.
It's not abracadabra.. :-)


Right, I really do appreciate that point but..........
I am a deb / dpkg guy.. I have spent years working that and tar.gz and make from the command line.
If I have three Sabayon package commands on the CL in the 5 or so years that I have worked off and on with Sabayon that would be a lot..
Whenever I do I must read up because I am unpracticed (regarding Gentoo) and can't even rely on my memory regarding the order of the commands..
So, I am the wrong guy to critique your Script..
Hell, It could have caused a Fire in my Gararge and would have missed the Constant or Variable in the Script.. :lol:
Criticism accepted for Solutions that work. ;^)
Sabayon 11-DEBIAN 7-#Sid-Slackware 14-Calculate 13-
User avatar
sqlpython
Technological Hen
 
Posts: 324
Joined: Mon Jun 18, 2007 7:01
Location: If It Moves Compile It

Re: tiny bash update script

Postby NoSavy » Thu Aug 04, 2011 22:05

Yes runs OK.
Not a criticism, just a note that perhaps a message in the header stating "this script must be run as root" would be advantageous to anybody unsure.

NS.
Asus M4A79XTD EVO motherboard, AMD Phenom II X4 965 CPU, 4 GB ram.
Gigabyte NVIDIA 9800GT Silent graphics card, Dell FP2007 22 Digital Flat panel.
Samsung harddisks 2 x 200gb SP2004S,1 x Hitachi 750gb HDT 72107,Optiarc SATA DVD-RW. Sabayon 64 & 32bit.
User avatar
NoSavy
Simple Hen
 
Posts: 67
Joined: Tue Aug 24, 2010 8:49
Location: Dorset,UK

Re: tiny bash update script

Postby sqlpython » Fri Aug 05, 2011 2:33

Very Good...
:)
Thanks..
Yeah, I just got this to ver. 6 a week ago and did not want to muck it up.
Criticism accepted for Solutions that work. ;^)
Sabayon 11-DEBIAN 7-#Sid-Slackware 14-Calculate 13-
User avatar
sqlpython
Technological Hen
 
Posts: 324
Joined: Mon Jun 18, 2007 7:01
Location: If It Moves Compile It


Return to Entropy|Equo|Rigo Package Managers

Who is online

Users browsing this forum: No registered users and 1 guest