Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/tools/pm_apply
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ mangle_libpath() {
fi

for p in $candidates; do
totl_lines=$(grep -c "^+++" "$PATCH_PATH")
cand_lines=$(grep -c "^+++ $p" "$PATCH_PATH")
totl_lines=$(grep -c "^\+\+\+" "$PATCH_PATH")
cand_lines=$(grep -c "^\+\+\+ [^/]*$p" "$PATCH_PATH")
if [ $cand_lines -eq 0 ]; then
continue # nothing found, try next
else
Expand All @@ -114,7 +114,7 @@ mangle_libpath() {
fi
fi
log "found: ${p}, replacing libpath references"

# prepare the replacement pattern
pr=""
if [ $SYS_BITNESS -eq 32 ]; then
Expand All @@ -129,7 +129,7 @@ mangle_libpath() {
printf '#\n# Patch converted to %sbit library paths from its original by Patchmanager > 3.1\n# Date: %s\n#\n' $SYS_BITNESS $(date -Iseconds) \
| cat - "$PATCH_PATH" > "$patch_edited_path"
fi
sed -i "s@^+++ $p@+++ $pr@;s@^--- $p@--- $pr@" "$patch_edited_path" || failure || true # patch the Patch
sed -i "s@^\+\+\+ \([^/]*\)$p@+++ \1$pr@;s@^--- \([^/]*\)$p@--- \1$pr@" "$patch_edited_path" || failure || true # patch the Patch
done
if [ $found -eq 0 ]; then
log
Expand Down