From bf6612f410dd0a62f85b61c17f7b0610203ed09c Mon Sep 17 00:00:00 2001 From: Michael Palimaka Date: Sat, 18 Jan 2014 01:17:04 +1100 Subject: [eclass] Only try to sed CMakeLists.txt if it exists. --- eclass/kde4-functions.eclass | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'eclass') diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass index 64f26df6262..830dcf68777 100644 --- a/eclass/kde4-functions.eclass +++ b/eclass/kde4-functions.eclass @@ -133,9 +133,10 @@ comment_add_subdirectory() { die "comment_add_subdirectory must be passed the directory name to comment" fi - sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${1}[[:space:]]*)/s/^/#DONOTCOMPILE /" \ - -i CMakeLists.txt || die "failed to comment add_subdirectory(${1})" - + if [[ -a "CMakeLists.txt" ]]; then + sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${1}[[:space:]]*)/s/^/#DONOTCOMPILE /" \ + -i CMakeLists.txt || die "failed to comment add_subdirectory(${1})" + fi } # @FUNCTION: comment_all_add_subdirectory -- cgit v1.2.3