Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92181380
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, Nov 18, 02:10
Size
890 B
Mime Type
text/x-shellscript
Expires
Wed, Nov 20, 02:10 (2 d)
Engine
blob
Format
Raw Data
Handle
21304033
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