From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sun, 29 May 2005 22:53:43 +0400 From: "Konstantin A. Lepikhov" To: ALT Linux kernel packages development Message-ID: <20050529185343.GA9802@lks.home> Mail-Followup-To: ALT Linux kernel packages development References: <20050522134014.GA468@lks.home> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20050522134014.GA468@lks.home> X-Operation-System: ALT Linux Sisyphus (20050527) 2.6.11-wks26-up-alt4 User-Agent: Mutt/1.5.8+cvs20050213i X-Virus-Scanned: by amavisd-new at smtp.elektrostal.ru Subject: [d-kernel] Re: kernelversion_code v0.2 X-BeenThere: devel-kernel@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ALT Linux kernel packages development List-Id: ALT Linux kernel packages development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2005 18:53:49 -0000 Archived-At: List-Archive: List-Post: Hi Konstantin! Sunday 22, at 05:40:14 PM you wrote: > Hi! > > вторая версия. > последний вариант, с исправлениями ldv@ #!/bin/sh -e # Small script to get the kernel version code # Made by LAKostis for ALTLinux kernel-build-tools package. # Tnx to Dmitry V. Levin for corrections. release="$1" [ -n $release ] || release=`uname -r` kver=`printf %s "$release" |cut -d- -f1` version=`printf %s "$kver" |cut -d. -f1` patchlevel=`printf %s "$kver" |cut -d. -f2` sublevel=`printf %s "$kver" |cut -d. -f3` # from kernel Makefile expr "$version" \* 65536 + "$patchlevel" \* 256 + "$sublevel" PS Сергей, ну так клать это в cvs для kernel-build-tools? -- WBR, Konstantin chat with ==>ICQ: 109916175 Lepikhov, speak to ==>JID: lakostis@jabber.org aka L.A. Kostis write to ==>mailto:lakostis@pisem.net.nospam ...The information is like the bank... (c) EC8OR