Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'readlink: illegal option -f' on macOS #8

Closed
olliejm opened this issue Mar 13, 2017 · 2 comments
Closed

'readlink: illegal option -f' on macOS #8

olliejm opened this issue Mar 13, 2017 · 2 comments

Comments

@olliejm
Copy link

olliejm commented Mar 13, 2017

I'm trying to patch the pulled fileset on macOS, but I'm getting the following error:

./patch-fileset patches/sigspoof-hook-7.0/ 23 fs-oneplus3t/
readlink: illegal option -- f
usage: readlink [-n] [file ...]
readlink: illegal option -- f
usage: readlink [-n] [file ...]
>>> target directory: fs-oneplus3t__sigspoof-hook-7.0
cp: illegal option -- t
usage: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file
       cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file ... target_directory

It seems like readlink is deprecated on macOS or something, how should I proceed?

@simonepsp
Copy link

simonepsp commented Mar 18, 2017

Hi,
essentially there are 2 issues :

  • readlink doesn't have the -f option
  • cp doesn't have the -t option

To fix the readlink issue you have to install greadlink via brew (brew install coreutils. Give a look here if you don't have Homebrew installed: https://brew.sh/index_it.html) and then replace "readlink" with "greadlink" in every haystack script. Alternatively you can run alias readlink=greadlink.

Now the cp issue: AFAIK macos' cp doesn't have the -t parameter. To fix this you have to replace cp -t "$patched_filterset_dir" "$fileset_dir"/*.{jar,apk} with cp $fileset_dir"/*.{jar,apk} $patched_filterset_dir in the patch-fileset script.

I'm not a mac user but this should do the job.
Cheers!

@Lanchon
Copy link
Owner

Lanchon commented Mar 18, 2017

thanks for the report. i don't support proprietary tools or OSes. you are on your own here, sorry for letting you down.

@Lanchon Lanchon closed this as completed Jun 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants