From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id CE7721F4B4 for ; Sun, 11 Apr 2021 12:47:04 +0000 (UTC) Received: from localhost ([::1]:48668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVZUV-0000mm-FZ for normalperson@yhbt.net; Sun, 11 Apr 2021 08:47:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVZUI-0000lg-Im for bug-gnulib@gnu.org; Sun, 11 Apr 2021 08:46:51 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.22]:14712) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVZUC-0005NH-7F for bug-gnulib@gnu.org; Sun, 11 Apr 2021 08:46:50 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1618145200; cv=none; d=strato.com; s=strato-dkim-0002; b=XxKVHPO1COsaIHJuKikIa+7bViitQewmSwz6OxI0r+uWq69S7jSAZtEl2zQCIqC943 UuzWc7u41RwTc8U5GlKu1l0+c/fBnEtMR4iVnzkxbvL+6nYzD9wECdM30sLb9UxY+KyY 32FQuxIS4Sh8BT0pM+k7HBCjvF/MDFAzWGwKvl+yiyYNi+GijkEnvVx/RbrPGEwI8Qbx onXFjyQ+GOotxesvxAwCDGmlGgOXvm/QKpwA30ZrtDX1NMWLHd1IDcSnxU6NYGN5cNtO 1htjnkJS9IMRPcHB7jTgjT1MaePaHcmVqb5hZw2n0Ap6aMhWR1XjKojvNZCdD30+/66I erZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1618145200; s=strato-dkim-0002; d=strato.com; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=ahoiychA9FH3ionNRvG8gqExBDMqt4WfLsHsOAA7D8I=; b=GTtfWG8oxX0HVCrSFbJAdGzCQecj+u3DMcsHPgnaVisvOeva9xr3ofKkkNkyyJ8qYT /kNLKM+7SBwkl4NhmU6jr0qIBPulTsPmOX4xL1bm50DB1uiUp459KqkueCbK59//glKv GWPQp+KqFmym9sjj5lFDHl+xtEv8ZLqTIIRAa0w3GqPrLIl7nAQ8l8g7y2GJSxXILyrJ ncPoYZQqdXLr9lRIM7thx4SNQ39nqwOsoyJrM3mdWH/3mmphwfa17utOUrrRMWAxTKqN EgiJAOSRCqHS8iV1mDECgjBNdS9wnygu2wRpqsHWsdjY400nIw6ieXMP9blcY2QMcQkz z1nw== ARC-Authentication-Results: i=1; strato.com; dkim=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1618145200; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=ahoiychA9FH3ionNRvG8gqExBDMqt4WfLsHsOAA7D8I=; b=rPuOPA8A4O+SxEViQgGhYygFhQSUtM9zKSjiMT/clm2n1CUyM8+cLRTO94q3NnA3fD Z17LpzMCj7AFKVcQ5t45x8Jlpv6S1aq/qm+VjNwGpuRYu0ma4qABkJqU3Yli4lTFlD/e 56XA8KLnwJP+kQRRj8OBxuaBcimaZ6316KUaeu/eHLD7fkbUg3zEC34mxw8fnXHxdgkJ 9FPEKPlRF3FtDlyL9iBecO4lKVcmzIeK5TsDNMMvDUSDVzYVZZhgAk9gQbFlUKj5etiL uCBh5r8V0QWNZjBEu5ZEvsL8cjo5D8R3c3RTz0W88WfUmOcBLNUmNlxfvp2VtjMqrYeE jZAw== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOHqf3z5NW" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 47.24.0 DYNA|AUTH) with ESMTPSA id 5024b1x3BCkeGeI (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Sun, 11 Apr 2021 14:46:40 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org Subject: increment-serial: New program Date: Sun, 11 Apr 2021 14:46:39 +0200 Message-ID: <2110613.BcfP0zQjkt@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-206-generic; KDE/5.18.0; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=85.215.255.22; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" This patch adds a program to increment the serial number of *.m4 files. I got tired of doing it by hand. 2021-04-11 Bruno Haible increment-serial: New program. * build-aux/increment-serial: New file. ========================== build-aux/increment-serial ========================== #!/bin/sh # Increment serial number in Autoconf *.m4 files. # Copyright (C) 2021 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . scriptversion=2021-04-11 copyright_year=`echo "$scriptversion" | sed -e 's/[^0-9].*//'` copyright="Copyright (C) ${copyright_year} Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law." usage="Usage: $0 [FILE...] Increments the serial number, if present, in each of the files. Options: --version output version information and exit --help print this help text and exit Send patches and bug reports to ." # Based on # sed_inc_serial='1,10 { /serial *[0-9]/ { s/\(serial *[0-9][0-9]*\)/\1~/ :a s/\(serial *[0-9]*\)9\(_*\)~/\1_\2~/ ta s/\(serial *\)\(_*\)~/\11\2~/ tb s/\(serial *[0-9]*\)8\(_*\)~/\19\2~/ tb s/\(serial *[0-9]*\)7\(_*\)~/\18\2~/ tb s/\(serial *[0-9]*\)6\(_*\)~/\17\2~/ tb s/\(serial *[0-9]*\)5\(_*\)~/\16\2~/ tb s/\(serial *[0-9]*\)4\(_*\)~/\15\2~/ tb s/\(serial *[0-9]*\)3\(_*\)~/\14\2~/ tb s/\(serial *[0-9]*\)2\(_*\)~/\13\2~/ tb s/\(serial *[0-9]*\)1\(_*\)~/\12\2~/ tb s/\(serial *[0-9]*\)0\(_*\)~/\11\2~/ tb :b s/\(serial *[0-9]*\)_/\10/ tb s/\(serial *[0-9]*\)~/\1/ } }' # func_process FILE func_process () { sed -i -e "$sed_inc_serial" "$1" || exit 1 } while test $# -gt 0; do case "$1" in --version) set -e echo "increment-serial $scriptversion" echo "$copyright" echo printf 'Written by %s.\n' "Bruno Haible" exit 0 ;; --help) set -e echo "$usage" exit 0 ;; --) shift while test $# -gt 0; do case "$1" in -*) func_process "./$1" ;; *) func_process "$1" ;; esac shift done break ;; -*) echo "$0: Unknown option '$1', try '$0 --help'" 1>&2 exit 1 ;; *) func_process "$1" ;; esac shift done exit 0