Skip to content

Commit dd1a211

Browse files
authored
Simplify code
Re-do and fix commit 2a1f08b
1 parent 9e16ec6 commit dd1a211

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/tools/pm_apply

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,10 @@ mangle_libpath() {
125125
if [ $found -eq $cand_lines ]; then # first run in loop
126126
mkdir -p "$PM_PATCH_BACKUP_DIR"
127127
patch_edited_path="$PM_PATCH_BACKUP_DIR"/"$PATCH_EDITED_NAME"
128-
printf '#\n# Patch converted to %sbit library paths from its original by Patchmanager > 3.1\n# Date: %s\n#\n' $SYS_BITNESS $(date -Iseconds) > "$patch_edited_path"
129-
cat "$PATCH_PATH" >> "$patch_edited_path"
130-
fi
131-
sed -i "s@^+++ $p@+++ $pr@;s@^--- $p@--- $pr@" "$patch_edited_path" # patch the Patch
132-
if [ $? -ne 0 ]; then
133-
failure
128+
printf '#\n# Patch converted to %sbit library paths from its original by Patchmanager > 3.1\n# Date: %s\n#\n' $SYS_BITNESS $(date -Iseconds) \
129+
| cat - "$PATCH_PATH" > "$patch_edited_path"
134130
fi
131+
sed -i "s@^+++ $p@+++ $pr@;s@^--- $p@--- $pr@" "$patch_edited_path" || failure || true # patch the Patch
135132
done
136133
if [ $found -eq 0 ]; then
137134
log

0 commit comments

Comments
 (0)