Добавил .sh файл для переписывания makefile под linux
This commit is contained in:
parent
241b43fa19
commit
597131452a
2 changed files with 16 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,3 @@
|
||||||
*.un~
|
|
||||||
*.exe
|
*.exe
|
||||||
*~
|
*~
|
||||||
*.out
|
*.out
|
||||||
|
|
16
makefile.sh
Normal file
16
makefile.sh
Normal 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."
|
Loading…
Add table
Add a link
Reference in a new issue