#!/bin/sh | |
# Copyright 2019 The Fuchsia Authors. All rights reserved. | |
# Use of this source code is governed by a BSD-style license that can be | |
# found in the LICENSE file. | |
OUTPUT="$1" | |
shift | |
set -e | |
exec > "$OUTPUT" | |
cat <<\EOF | |
// Autogenerated: Do not modify! | |
#include <map> | |
#include <string> | |
#include "examples.h" | |
std::map<std::string, std::string> Examples::map_ = { | |
EOF | |
for file; do | |
printf " {\"$file\", R\"FIDL(" | |
cat "$file" | |
printf ")FIDL\"}," | |
done | |
echo '};' |