aboutsummaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorHarald Musum <musum@yahooinc.com>2022-06-08 08:36:59 +0200
committergjoranv <gv@verizonmedia.com>2022-06-08 11:45:32 +0200
commitd4562260628bf666b56705e03f4ba41dd3d33621 (patch)
treefd798222d1dbe66af3bd31c4ecaaa3ac6cded388 /config-model
parent789634f8caa3319d0498577985e4a09165b7f713 (diff)
Remove undocumented, non-working tool for expanding config
Diffstat (limited to 'config-model')
-rw-r--r--config-model/CMakeLists.txt1
-rwxr-xr-xconfig-model/src/main/perl/vespa-expand-config.pl84
2 files changed, 0 insertions, 85 deletions
diff --git a/config-model/CMakeLists.txt b/config-model/CMakeLists.txt
index 80776eb99c5..cecbfe7a646 100644
--- a/config-model/CMakeLists.txt
+++ b/config-model/CMakeLists.txt
@@ -2,7 +2,6 @@
install_jar(config-model-jar-with-dependencies.jar)
vespa_install_script(src/main/perl/vespa-deploy bin)
-vespa_install_script(src/main/perl/vespa-expand-config.pl bin)
install(DIRECTORY src/main/resources/schema DESTINATION share/vespa PATTERN ".gitignore" EXCLUDE)
install(DIRECTORY src/main/resources/schema DESTINATION share/vespa/schema/version/8.x PATTERN ".gitignore" EXCLUDE)
diff --git a/config-model/src/main/perl/vespa-expand-config.pl b/config-model/src/main/perl/vespa-expand-config.pl
deleted file mode 100755
index 7fa2ce69707..00000000000
--- a/config-model/src/main/perl/vespa-expand-config.pl
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/usr/bin/env perl
-# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-#============================================================================
-# @version $Id: expand-config.pl,v 1.1 2006-07-26 15:52:43 gv Exp $
-# @project Vespa Admin
-# @author Gj�ran Voldengen
-# @date created 2005-04-15
-#
-# Create a vespa config file from an application package config file
-# that might contain "file=<filename>" statements. The output stream
-# consists of the original file contents, with the expanded and escaped
-# contents of the files given in file= statements.
-#=============================================================================
-
-use strict;
-
-$| = 1;
-
-# Check for correct number of command line args
-if ( int(@ARGV) != 0 ) {
- die ("\nUsage: cat infile | $0 > outfile\n\n");
-}
-
-
-#============================================================================
-# Global Constants
-#============================================================================
-
-# "Reserved keywords" to recognize in input file
-my $FILE = "file";
-
-
-#============================================================================
-# Subroutines
-#============================================================================
-
-#---------------------------------------------------------------------------
-# Expand the contents of the input file into a one-line string,
-# escaping special chars.
-#---------------------------------------------------------------------------
-sub expandFile {
- my ($filename) = @_;
-
- my $config = "";
-
- # Read the complete input file into a single string
- open (INFILE, "$filename") || die "Cannot open $filename\n";
- while (<INFILE>) {
- $config .= $_;
- }
-
- $config =~ s{\\}{\\\\}g;
- $config =~ s{\"}{\\\"}g; #" emacs gets confused..
- $config =~ s{\n}{\\n}g;
-
- return $config;
-}
-
-
-#============================================================================
-# Main program
-#============================================================================
-my $file = "";
-
-while (<STDIN>) {
-
- # Comment lines are allowed, and must be preserved, along with all
- # lines that don't contain "file="
- unless (m/^\#/) {
- # Allow several files on one line
- while (m{$FILE \s* = \s* ([^\s\"]+) }x) { #"
- $file = $1;
- $file =~ s{^\s+}{};
- $file =~ s{\s+ $ }{}x;
- $_ = $` . expandFile($file) . $';
- }
- }
- print STDOUT ($_);
-}
-
-
-
-############################### File end ################################