gentoo-tools

Some Gentoo helper tools
git clone git://r-36.net/gentoo-tools
Log | Files | Refs | LICENSE

ehardened (953B)


      1 #!/bin/sh
      2 
      3 [ $# -gt 1 ] && echo "Wrong number of arguments: Expected 1 or 0" && exit 1
      4 
      5 if [ $# -lt 1 ] && [ -z "$(eselect profile show | grep hardened)" ];
      6 then
      7 	printf "usage:\n    %s [profileid]\n\n" "$(basename "$0")" >&2
      8 	printf "The following profile ids are available:...\n" >&2
      9 	eselect profile list
     10 	exit 1
     11 fi
     12 
     13 pnum="$1"
     14 
     15 # TODO: Put old selection back, when this can be more streamlined.
     16 #pnum="$(eselect profile list | grep hardened \
     17 #	| head -n 1 | cut -d '[' -f 2 | cut -d ']' -f 1)"
     18 #if [ -z "$pnum" ];
     19 #then
     20 #	printf "hardened profile not available.\n" >&2
     21 #	exit 1
     22 #fi
     23 
     24 [ $# -eq 1 ] && eselect profile set $pnum
     25 
     26 emerge -1 sys-devel/gcc
     27 gcc-config -l
     28 source /etc/profile
     29 emerge -1 --usepkg=n libtool
     30 emerge -1 sys-devel/binutils sys-libs/glibc
     31 
     32 emerge -e --keep-going @system
     33 emerge -e --keep-going @world
     34 
     35 printf "You might repeat the steps below.\n"
     36 printf "emerge -e --keep-going @system\n"
     37 printf "emerge -e --keep-going @world\n"
     38