From c129d06ea08c018d68aa195a7c477859b66d3e16 Mon Sep 17 00:00:00 2001 From: "tlimoncelli@stackexchange.com" Date: Mon, 15 Jun 2015 20:32:35 +0000 Subject: [PATCH] is_on_cryptlist reversed arguments to file_contains_line() --- bin/_blackbox_common.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/_blackbox_common.sh b/bin/_blackbox_common.sh index c5ecf34..f9534c8 100755 --- a/bin/_blackbox_common.sh +++ b/bin/_blackbox_common.sh @@ -68,7 +68,7 @@ SECRING="${KEYRINGDIR}/secring.gpg" # Return error if not on cryptlist. function is_on_cryptlist() { # Assumes $1 does NOT have the .gpg extension - file_contains_line "$(vcs_relative_path "$1")" "$BB_FILES" + file_contains_line "$BB_FILES" "$(vcs_relative_path "$1")" } # Exit with error if a file exists. @@ -309,7 +309,9 @@ function remove_line() { # Determine if a file contains a given line function file_contains_line() { - grep -Fxsq "$2" "$1" + # $1: the file + # $2: the line + grep -xsqF "$2" "$1" } #