ALT Linux kernel packages development
 help / color / mirror / Atom feed
* [d-kernel] kernelversion_code v0.2
@ 2005-05-22 13:40 Konstantin A. Lepikhov
  2005-05-29 18:53 ` [d-kernel] " Konstantin A. Lepikhov
  0 siblings, 1 reply; 2+ messages in thread
From: Konstantin A. Lepikhov @ 2005-05-22 13:40 UTC (permalink / raw)
  To: ALT Linux Kernel Devel Mailing List

Hi!

вторая версия.

#!/bin/sh 
# Small script to get the kernel version code
# Made by LAKostis for ALTLinux kernel-build-tools package.

release="$1"
[ ! $release ] && release=`uname -r`
kver=`echo $release|cut -d- -f1`
version=`echo $kver|cut -d. -f1`
patchlevel=`echo $kver|cut -d. -f2`
sublevel=`echo $kver|cut -d. -f3`

# from kernel Makefile
echo `expr $version \\* 65536 + $patchlevel \\* 256 + $sublevel`


-- 
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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [d-kernel] Re: kernelversion_code v0.2
  2005-05-22 13:40 [d-kernel] kernelversion_code v0.2 Konstantin A. Lepikhov
@ 2005-05-29 18:53 ` Konstantin A. Lepikhov
  0 siblings, 0 replies; 2+ messages in thread
From: Konstantin A. Lepikhov @ 2005-05-29 18:53 UTC (permalink / raw)
  To: ALT Linux kernel packages development

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-05-29 18:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-22 13:40 [d-kernel] kernelversion_code v0.2 Konstantin A. Lepikhov
2005-05-29 18:53 ` [d-kernel] " Konstantin A. Lepikhov

ALT Linux kernel packages development

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \
		devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com
	public-inbox-index devel-kernel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git