]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Yay It Works, Clean Up Logging A Bit 2103/head
authorW. Felix Handte <w@felixhandte.com>
Tue, 5 May 2020 19:25:18 +0000 (15:25 -0400)
committerW. Felix Handte <w@felixhandte.com>
Tue, 5 May 2020 19:27:27 +0000 (15:27 -0400)
contrib/single_file_libs/combine.sh

index 2fef0541cbf6a1fca81a03b96f126a3cfeaa5c48..05c7bce8e5cb8c237f99046164d6c5218fb99959 100755 (executable)
@@ -83,12 +83,12 @@ resolve_include() {
       # Try to reduce the file path into a canonical form (so that multiple)
       # includes of the same file are successfully deduplicated, even if they
       # are expressed differently.
-      local relpath="$(realpath --relative-to . "$root/$inc")"
+      local relpath="$(realpath --relative-to . "$root/$inc" 2>/dev/null)"
       if [ "$relpath" != "" ]; then # not all realpaths support --relative-to
         echo "$relpath"
         return 0
       fi
-      local relpath="$(realpath "$root/$inc")"
+      local relpath="$(realpath "$root/$inc" 2>/dev/null)"
       if [ "$relpath" != "" ]; then # not all distros have realpath...
         echo "$relpath"
         return 0
@@ -125,7 +125,7 @@ add_file() {
         if list_has_item "$XINCS" "$inc"; then
           # The file was excluded so error if the source attempts to use it
           write_line "#error Using excluded file: $inc"
-          log_line "Excluding: $res_inc ($inc)"
+          log_line "Excluding: $inc"
         else
           if ! list_has_item "$FOUND" "$res_inc"; then
             # The file was not previously encountered
@@ -134,7 +134,7 @@ add_file() {
               # But the include was flagged to keep as included
               write_line "/**** *NOT* inlining $inc ****/"
               write_line "$line"
-              log_line "Not Inlining: $res_inc ($inc)"
+              log_line "Not Inlining: $inc"
             else
               # The file was neither excluded nor seen before so inline it
               write_line "/**** start inlining $inc ****/"
@@ -143,7 +143,6 @@ add_file() {
             fi
           else
             write_line "/**** skipping file: $inc ****/"
-            log_line "Skipping: $res_inc ($inc)"
           fi
         fi
       else