AIDE:Data/cf/m4files.sh

From Tom
Jump to: navigation, search
#!/usr/bin/env bash
#
# SVN Id:        $Id: m4files.sh 1294 2015-02-27 19:13:41Z aa0026 $
#
# Last Changed:  $Date: 2015-02-27 14:13:41 -0500 (Fri, 27 Feb 2015) $
#

export LC_COLLATE="C" 

find ../src -type f -name "*.m4" -print | 
egrep -v "/\\.example" |
sort | 
gawk '

BEGIN {
    i = 0

    printf("#\n")
    printf("# Do NOT edit this system file by hand -- use subversion.  See \"URL to source\" below.\n")
    printf("#\n")
    printf("# SVN Id:        $Id: m4files.sh 1294 2015-02-27 19:13:41Z aa0026 $\n")
    printf("#\n")
    printf("# Last Changed:  $Date: 2015-02-27 14:13:41 -0500 (Fri, 27 Feb 2015) $\n")
    printf("#\n\n")
}

{
    a[++i] = $0
}

END {
    if ( i > 0) { 
	printf("M4FILES=\\\n")
	for (j=1;j<i;++j) {
	    sub("../src/","AIDE:data/src/",a[j]) 
	    print a[j] " \\"
	}
	sub("../src/","AIDE:data/src/",a[i]) 
	print a[i]
    }
}

' > m4files.mk

--Tom Stevenson (talk) 13:04, 4 February 2016 (EST)

Help contents:

Reading: Go | Search | URL | Namespace | Page name | Section | Link | Backlinks | Piped link | Interwiki link | Redirect | Variable | Category | Special page
Tracking changes: Recent | (enhanced) | Related | Watching pages | Page history | Diff | User contributions | Edit summary | Minor edit | Patrolled edit
Logging in and preferences: Logging in | Preferences | User style
Editing: Overview | Wikitext | New page | List | Images/files | Image page | Special characters | Formula | Table | EasyTimeline | Inputbox | Template | (p. 2) | Renaming (moving) a page | Editing shortcuts | Talk page | Testing | Export | Import | rlc |