forked from NUDT-compiler/nudt-compiler-cpp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
406 B
16 lines
406 B
#!/bin/bash
|
|
|
|
SRC_DIR=~/compile/compiler/nudt-compiler-cpp/src
|
|
DST_DIR=~/compile/compiler/nudt-compiler-cpp/warning/src
|
|
|
|
mkdir -p "$DST_DIR"
|
|
|
|
find "$SRC_DIR" \( -name '*.cpp' -o -name '*.h' \) | while read -r file; do
|
|
rel_path="${file#$SRC_DIR/}"
|
|
dir=$(dirname "$rel_path")
|
|
mkdir -p "$DST_DIR/$dir"
|
|
cp "$file" "$DST_DIR/$rel_path"
|
|
done
|
|
|
|
echo "Done. All .cpp and .h files copied to $DST_DIR"
|