Skip to content

Commit

Permalink
patch: fix chmod patching of plugins (it only worked for core)
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Feb 28, 2018
1 parent 7a5bf30 commit f5f37da
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Makefile.inc
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
upgrade: all install clean

update:
@git pull
8 changes: 6 additions & 2 deletions patch/opnsense-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,12 @@ for ARG in ${@}; do
patch -Et -p ${PATCHLEVEL} -d "${PREFIX}" -i "${WORKDIR}/${ARG}.patch"
cat "${WORKDIR}/${ARG}.patch" | while read PATCHLINE; do
case "${PATCHLINE}" in
"diff --git "*" b/src/"*)
PATCHFILE="${PREFIX}/$(echo "${PATCHLINE}" | awk '{print $4 }' | cut -c 7-)"
"diff --git a/"*" b/"*)
PATCHFILE="$(echo "${PATCHLINE}" | awk '{print $4 }')"
for INDEX in $(seq 1 ${PATCHLEVEL}); do
PATCHFILE=${PATCHFILE#*/}
done
PATCHFILE="${PREFIX}/${PATCHFILE}"
;;
"new file mode "*)
PATCHMODE=$(echo "${PATCHLINE}" | awk '{print $4 }' | cut -c 4-6)
Expand Down

0 comments on commit f5f37da

Please sign in to comment.