Добавил .sh файл для переписывания makefile под linux

This commit is contained in:
AZEN-SGG 2024-12-15 13:46:06 +03:00
parent 241b43fa19
commit 597131452a
2 changed files with 16 additions and 1 deletions

1
.gitignore vendored
View file

@ -1,4 +1,3 @@
*.un~
*.exe *.exe
*~ *~
*.out *.out

16
makefile.sh Normal file
View file

@ -0,0 +1,16 @@
#!/bin/bash
find . -type f -name "Makefile" | while read -r file; do
echo "Processing file: $file"
tmp_file=$(mktemp)
sed -e 's/a\.exe/\.\/a\.out/g' \
-e 's/\<del\>/rm/g' \
-e 's/\-lssp//g' "$file" > "$tmp_file"
mv "$tmp_file" "$file"
echo "File $file processed."
done
echo "All Makefiles processed."