Files
research-portable-memory/v4/cxx-headers
Михаил Капелько ed7d1cd486 d
2024-05-26 22:39:52 +03:00

27 lines
475 B
Bash
Executable File

#!/bin/bash
DIR=$(cd "$(dirname "$0")" ; pwd -P)
TMP=/tmp/cxx-headers.tmp
grep '^memory_Context ' memory.cpp > $TMP
grep '^std::string ' memory_test.cpp >> $TMP
grep '^memory_Context ' cli.cpp >> $TMP
grep '^std::string ' cli_test.cpp >> $TMP
grep '^std::string ' llm_test.cpp >> $TMP
IN=$TMP
OUT=$DIR/main.h
echo '
#include "memory_Context.h"
#ifndef main_HEADER
#define main_HEADER
' > $OUT
sed -Ef cxx-headers.sed <$IN >>$OUT
echo '
#endif // main_HEADER
' >> $OUT