Skip to content
Snippets Groups Projects
Commit a495b510 authored by intrigeri's avatar intrigeri
Browse files

Add a script allowing the source package to put specific profiles in complain mode.

parent 2cf0a05c
No related branches found
Tags debian/1.14
No related merge requests found
#!/bin/sh
set -e
set -u
set -x
[ $# -eq 1 ] || exit 1
PROFILE="$1"
[ -n "$PROFILE" ] || exit 2
[ -f "$PROFILE" ] || exit 3
if egrep -q 'flags=\(.*\) {' "$PROFILE"; then
# Deal with existing flags, but need to account for multiple
# profiles in one file and not all of them having the same
# flags.
grep -q 'flags=(complain)' "$PROFILE" && continue
sed -i -e 's/flags=(\(.*\)) {$/flags=(complain,\1) {/' -e 's/ {$/ flags=(complain) {/' -e 's/) flags=(complain) {/) {/' "$PROFILE"
else
# No existing flags
sed -i 's/ {$/ flags=(complain) {/' "$PROFILE"
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment