How does OS X detect a PowerPC application? I use an application called Anki for learning foreign languages and professional terminology.
This app creates a default folder in /Users/user/Documents/Anki, which I did not want.

You can circumvent this by calling the app from the CLI with the -b option. Because of that, I went into the app bundle and looked for executable in Anki.app/Contents/MacOs/, which is simply called Anki.

I renamed this file to Anki2 and made a new executable called Anki, which simply reads:

/Applications/Anki.app/Contents/MacOS/Anki2 -b /Users/henrikgiesel/Library/Application\ Support/Anki  


And I can open the App bundle perfectly fine!... Until the next reboot, then it will complain:

You can’t open the application “Anki.app” because PowerPC applications are no longer supported.

Why is this? How does OS X detect PowerPC application? Would it work if I wrote a C-file doing basically the same and putting the compiled version in the place of the Shell script?

EDIT:

I can still open it from the CLI like this:

/Applications/Anki.app/Contents/MacOS/Anki


But not like this

open /Applications/Anki.app
Try wrapping the shell script as an app using Platypus. I've packaged multiple perl and bash scripts using the program, all appear as simple applications, with an icon of your choice, none have ever been misidentified as PPC apps.