Question how to apply patches to CB

Discussion in 'Community Feedback and Suggestions' started by ShaneBee, Jun 23, 2021.

  1. I used to be able to do work on Bukkit/CB (ive done a few PRs), but today when I tried I get a couple of errors

    1) When I run "./applyPatches.sh" I should get this warning:
    ""Please run this script again with the clean decompile sources as an argument. In most cases this will be ../work/decompile-XXXX""

    but I get:
    ""./applyPatches.sh: line 5: $1: unbound variable""

    2) When I run "./applyPatches.sh (path to decompile source)"
    I get this error:
    ""find: -printf: unknown primary or operator""

    Im running on macOS. Anyone else have this issue and able to solve it?

    I noticed @md_5 did some changes to the applyPatches file recently (in march I think I saw), so I'm guessing maybe something doesn't agree with Mac, and hopefully md_5 can shed some light on this.


    EDIT:
    did some digging, hope this helps:
    https://unix.stackexchange.com/questions/272491/bash-error-find-printf-unknown-primary-or-operator

    ""The -printf option is not in POSIX find. It is a feature of GNU find, e.g., on Linux.""
    Seems like the printf option isn't on macOS
     
    #1 ShaneBee, Jun 23, 2021
    Last edited: Jun 23, 2021
  2. Workaround for the time being is installing a version of find via HomeBrew or Macports.

    https://formulae.brew.sh/formula/findutils

    Adding to the path to get the gnu find without g prefix
    PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"
     
    #3 ysl3000, Jun 24, 2021
    Last edited: Jun 24, 2021
  3. ooo good to know, thanks