scripts

random scripts
git clone https://git.parazyd.org/scripts
Log | Files | Refs

emerupd (709B)


      1 #!/bin/sh
      2 
      3 usage() {
      4 	cat <<EOM
      5 $(basename $0): gentoo update wrapper
      6 usage:
      7 	$(basename $0) [step#]
      8 
      9 	steps:
     10 		1) sync (runs eix-sync)
     11 		2) update (does a complete system upgrade)
     12 		3) glsa (does a GLSA check on the system)
     13 		4) depclean (removes unused packages)
     14 		5) preserved-rebuild (runs @preserved-rebuild if needed)
     15 		6) revdep-rebuild (runs revdep-rebuild if needed)
     16 EOM
     17 	exit 1
     18 }
     19 
     20 case "x$1" in
     21 x1)
     22 	sudo eix-sync -a
     23 	;;
     24 x2)
     25 	sudo emerge -avuDN --verbose-conflicts --with-bdeps=y @world && \
     26 	sudo emerge -av @smart-live-rebuild
     27 	;;
     28 x3)
     29 	sudo glsa-check -t all
     30 	;;
     31 x4)
     32 	sudo emerge -av --depclean
     33 	;;
     34 x5)
     35 	sudo emerge -av @preserved-rebuild
     36 	;;
     37 x6)
     38 	sudo revdep-rebuild.sh -v
     39 	;;
     40 *)
     41 	usage
     42 	;;
     43 esac