#!/bin/bash | |
# Copyright 2020 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. | |
exec > "$1" | |
shift | |
echo '// DO NOT EDIT THIS FILE' | |
echo "// Generated from $0 $*" | |
version_string=$(grep -ao 'OPENTHREAD/[[:print:]]*' $1) | |
echo "#include <string> | |
namespace ot { | |
std::string GetNewFirmwareVersion() { | |
return \"$version_string\"; | |
} | |
}" |