[bglug] 2.6.17

k|b|s kbs@bglug.it
Lun 19 Giu 2006 18:03:08 CEST


Fleur @ BGLUG al scrîf:
> 1. Voglio lo scriptino !
Non è niente di che. Ha solo i colori.
;^)


!!cat bin/getkernel -->

--8<-- CUT HERE --8<-- 
#!/bin/bash
#
# getkernel v0.1
# get latest stable version of linux kernel
# by k|b|s <joegalaxy(at)bluebottle(dot)com>
# License: GPL - http://www.gnu.org/licenses/gpl.txt
#

# Colors
black='\E[0;0;30m'
blue='\E[0;0;34m'
green='\E[0;0;32m'
cyan='\E[0;0;36m'
red='\E[0;0;31m'
purple='\E[0;0;35m'
brown='\E[0;0;33m'
lightgray='\E[0;0;37m'
darkgray='\E[0;1;30m'
lightblue='\E[0;1;34m'
lightgreen='\E[0;1;32m'
lightcyan='\E[0;1;36m'
lightred='\E[0;1;31m'
lightpurple='\E[0;1;35m'
yellow='\E[0;1;33m'
white='\E[0;1;37m'
Reset="tput sgr0"
cecho ()
{
  message=${1:-}
  color=${2:-}
  echo -e "$color""$message"
  $Reset
  return
}


version=`finger @kernel.org | grep "latest stable version" | \
awk -F ":" '{print $2}' | sed 's/^[ \t]*//' | awk -F "." '{print $1"."$2}'`

latest=`finger @kernel.org | grep "latest stable version" | \
awk -F ":" '{print $2}' | sed 's/^[ \t]*//'`

uname=`uname -r`

echo ""
cecho $white"Installed version is$lightgreen $uname"
cecho $white"Latest stable version is$lightred $latest"
cecho $white"Do you want to download it?$purple [y|N]$white"
echo ""
read answer
case $answer in
	y|Y)
	echo ""
	cecho $yellow"Downloading linux-$latest.tar.bz2..."
	wget -c -v "ftp.kernel.org:/pub/linux/kernel/v$version/linux-$latest.tar.bz2"
	echo ""
	cecho $yellow"Done, have fun ;^)"
	;;
	*)
	cecho $yellow"Ok, byez"
	exit
	;;
esac
--8<-- CUT HERE --8<-- 


-- 
This signature is certified J.R. Tolkien free.
kbs ~> mailto  `echo ti.gulgb@sbk|'rev'`


Maggiori informazioni sulla lista bglug