Handle config.guess and config.sub with DOS EOLs
[platform/upstream/rpm.git] / build / parseBuildInstallClean.c
index 1995717..5ecf77c 100644 (file)
@@ -59,7 +59,7 @@ int parseBuildInstallClean(rpmSpec spec, int parsePart)
                           "for s in guess sub; do\n"
                           "    for c in $(find -maxdepth 8 -name \"config.$s\"); do\n"
                           "         grep -q config-patches@ $c || continue\n"
-                          "         timestamp=$(sed -n \"/^timestamp=/{s///;s/[-'\\\"]//g;p;q;}\" $c)\n"
+                          "         timestamp=$(sed -n \"/^timestamp=/{s///;s/[-'\\\"]//g;p;q;}\" $c | tr -d '\r')\n"
                           "         test -n \"$timestamp\" || timestamp=0\n"
                           "         test $timestamp -ge $mints || install -m 755 $ref/config.$s $c\n"
                           "     done\n"