Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103590727
extra_cleanup.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Mar 3, 05:19
Size
890 B
Mime Type
text/x-shellscript
Expires
Wed, Mar 5, 05:19 (1 d, 8 h)
Engine
blob
Format
Raw Data
Handle
24150425
Attached To
rLAMMPS lammps
extra_cleanup.sh
View Options
#!/bin/sh
# do some cleaning up to fix permissions and remove cruft
# delete backup and patch rejection files
find ./ -name \*.orig -print -or -name \*~ -print -or -name \*.rej -print \
| xargs rm -vf
# remove executable permissions from sources
find ./ -name \*.cpp -print -or -name \*.c -print \
-or -name \*.h -print -or -name Makefile\* -print \
| xargs chmod -x $f
# remove trailing whitespace from C/C++ source files
find ./ -name \*.cpp -print -or -name \*.c -print -or -name \*.h -print \
| xargs sed -i -e 's,[ ]\+$,,'
# change #include "..." to #include <...> for system headers
find ./ -name \*.cpp -print -or -name \*.c -print -or -name \*.h -print \
| xargs sed -i -e 's,^#include \+"\(Python\|assert\|ctype\|direct\|dirent\|errno\|float\|inttypes\|limits\|math\|mpi\|omp\|rpc/.\*\|stdint\|stdio\|stdlib\|string\|sys/\*\|time\|unistd\)\.h",#include <\1.h>,'
Event Timeline
Log In to Comment