diff options
author | Arne Juul <arnej@yahoo-inc.com> | 2017-09-19 08:37:28 +0000 |
---|---|---|
committer | Arne Juul <arnej@yahoo-inc.com> | 2017-09-19 08:37:28 +0000 |
commit | 81be66108ab02a443562e36c0d4de94c2114c202 (patch) | |
tree | 3944b3b63f2ee131ecaeba025033157ff6df8c5e /vespalib | |
parent | ba8fcd381e64a10533f2d3ff9f9528e1262938e3 (diff) |
garbage collect outdated scripts
Diffstat (limited to 'vespalib')
-rwxr-xr-x | vespalib/fix-hg.pl | 50 | ||||
-rwxr-xr-x | vespalib/fix-hg.sh | 8 |
2 files changed, 0 insertions, 58 deletions
diff --git a/vespalib/fix-hg.pl b/vespalib/fix-hg.pl deleted file mode 100755 index fe5eb1101de..00000000000 --- a/vespalib/fix-hg.pl +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/perl -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -foreach $arg ( @ARGV ) { - $hgd = $arg; # maybe: . "_"; - $hgd =~ s{\W}{_}g; - $hgd =~ tr{a-z}{A-Z}; - $hgd =~ s{^_*}{H_}; - -# print "arg $arg header guard $hgd\n"; - - open(FOO, $arg) or die "Cannot open '$arg'\n"; - $backup = $arg . ".orig"; - rename ($arg, $backup); - - open(ARGVOUT, ">$arg") or die "cannot write to '$arg'\n"; - select(ARGVOUT); - - my $eic = 0; - my $cnt = 1; - - while (<FOO>) { - ++$eic if m{#endif} ; - } - seek FOO, 0, 0; - while (<FOO>) { - if ($cnt == 1 and m{^#ifndef}) { - s{\s.*}{ $hgd}; - ++$cnt; - } - if ($cnt == 2 and m{^#define}) { - s{\s.*}{ $hgd}; - ++$cnt; - } - if ( m{#endif} ) { - --$eic; - if ($eic == 0) { - s{.*#endif.*}{#endif // header guard}; - } - } - print; - } - close(FOO); - select(STDOUT); - close(ARGVOUT); - - unlink($backup); -} - -exit 0; diff --git a/vespalib/fix-hg.sh b/vespalib/fix-hg.sh deleted file mode 100755 index 57c7d48bc58..00000000000 --- a/vespalib/fix-hg.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -td=${0%.sh}.pl -if [ -f "$td" ]; then - find . -name '*.h' -o -name '*.hpp' | xargs $td -else - echo "Could not find '${td}'" -fi |