-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup_cpp.sh
More file actions
executable file
·40 lines (29 loc) · 951 Bytes
/
setup_cpp.sh
File metadata and controls
executable file
·40 lines (29 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# === Smart Autocomplete (C++) Project Scaffolder ===
# Run: bash setup_cpp.sh
ROOT="smart_autocomplete"
echo "📁 Creating C++ project: $ROOT"
mkdir -p $ROOT/{include,src,data,tests}
# --- Header files ---
touch $ROOT/include/{tst.h,minheap.h,lru.h,kmp.h,stack.h,graph.h,freq_store.h,ranker.h}
# --- Source files ---
touch $ROOT/src/{main.cpp,tst.cpp,minheap.cpp,lru.cpp,kmp.cpp,stack.cpp,graph.cpp,freq_store.cpp,ranker.cpp}
# --- Data + Tests ---
touch $ROOT/data/seeds.txt
touch $ROOT/tests/{tst_test.cpp,lru_test.cpp,heap_test.cpp}
# --- README + Makefile ---
touch $ROOT/README.md
cat << 'EOF' > $ROOT/Makefile
CXX = g++
CXXFLAGS = -std=c++17 -O2 -Wall -Iinclude
SRC = $(wildcard src/*.cpp)
OBJ = $(SRC:.cpp=.o)
TARGET = smart_autocomplete
all: \$(TARGET)
\$(TARGET): \$(OBJ)
\$(CXX) \$(CXXFLAGS) -o \$@ \$(OBJ)
clean:
rm -f \$(OBJ) \$(TARGET)
EOF
echo "✅ C++ Smart Autocomplete project scaffold created!"
tree $ROOT