From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: To: devel-kernel@altlinux.ru From: Peter Novodvorsky Organization: Intoxicated by Myxomop Date: Thu, 31 Jul 2003 17:33:33 +0400 Message-ID: <87n0euzuqa.fsf@velvet.po.cs.msu.su> User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit Sender: Peter Novodvorsky Subject: [d-kernel] script that upgrades module specs X-BeenThere: devel-kernel@altlinux.ru X-Mailman-Version: 2.1.2 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: Thu, 31 Jul 2003 13:33:55 -0000 Archived-At: List-Archive: List-Post: Greetings! Я написал подобие скрипта о котором недавно шла речь. Он обновляет krelease и kversion в спеках модулей и добавляет соответствующую запись в changelog. ------- CUT HERE -------- # upgrade all specs if [ $# -lt 3 ]; then echo "Usage: $0 NEW_KERNEL_VERSION NEW_KERNEL_RELEASE " fi kernel_version=$1 shift kernel_release=$1 shift spec_list=$@ for i in $spec_list; do sed -e "s/kversion .*/kversion $kernel_version/" -e "s/krelease .*/krelease $kernel_release/" < $i > $i.new new_release=$(expr `grep '%define.*module_release' $i | sed -e 's/.*alt\([[:digit:]]*\)/\1/'` + 1) sed -e "s/module_release .*/module_release alt$new_release/" < $i.new > $i rm -f $i.new add_changelog -e "- rebuilt with $kernel_version-$kernel_release" $i done ------- CUT HERE -------- -- Peter Novodvorsky nidd@myxomop.com http://people.altlinux.ru/~nidd Deadheads, unite!