Page MenuHome GnuPG

ensure_config_h-included.sh
No OneTemporary

ensure_config_h-included.sh

#!/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

Mime Type
text/x-shellscript
Expires
Sat, Jan 17, 2:05 AM (25 m, 3 s)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
9b/7d/5b9c95fe3c35ac8ddbce409cfb2f

Event Timeline