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

osx how to fix ./gen_sdk_package.sh: line 55: $2: ambiguous redirect tar: Write error #361

Open
kocoman2 opened this issue Sep 26, 2022 · 1 comment

Comments

@kocoman2
Copy link

how to fix

tools % ./gen_sdk_package.sh

found Xcode: /Applications/Xcode.app
packaging MacOSX12.3 SDK (this may take several minutes) ...
./gen_sdk_package.sh: line 55: $2: ambiguous redirect
tar: Write error

line 55...

tar cf - $1 | $SDK_COMPRESSOR -5 - > $2 ;;

thx

@mite-user
Copy link
Contributor

ambiguous redirect might indicate there is something wrong with the path $WDIR/$SDK$SDK_EXT.

WDIR=$(pwd)

SDKS=$(ls | grep -E "^MacOSX13.*|^MacOSX12.*|^MacOSX11.*|^MacOSX10.*" | grep -v "Patch")

compress "*" "$WDIR/$SDK$SDK_EXT"

function compress()
{
case $SDK_COMPRESSOR in
"zip")
$SDK_COMPRESSOR -q -5 -r - $1 > $2 ;;
*)
tar cf - $1 | $SDK_COMPRESSOR -5 - > $2 ;;
esac
}

Does path to the current directory contain spaces?
Are there some unexpected files/directories matching ^MacOSX13.*|^MacOSX12.*|^MacOSX11.*|^MacOSX10.*?

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

2 participants