Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F37954808
ensure_config_h-included.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
425 B
Subscribers
None
ensure_config_h-included.sh
View Options
#!/bin/bash
CONFIG_H
=
config-kleopatra.h
#
# Adds #include <$CONFIG_H> to all implementation files,
# right before the first existing preprocessor directive (^#)
#
my_REPLACEMENT_TEXT
=
'#include <config-kleopatra.h>
'
find
"
$@
"
-name
'*.cpp'
-o -name
'*.cc'
-o -name
'*.cxx'
-o -name
'*.c'
|
\
xargs grep -LE
'# *include *[<"]config-kleopatra.h[>"]'
|
\
xargs perl -0777 -pi
\~
-e
"s/^#/
${
my_REPLACEMENT_TEXT
}
#/m;"
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Thu, Mar 19, 6:03 PM (5 h, 6 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
cc/f6/6cbd818a761da2b49b1a298426f0
Attached To
rKLEOPATRA Kleopatra
Event Timeline
Log In to Comment