osacompile

From RaySoft

osacompile compiles AppleScripts and other 'OSA' language scripts.[1]

osacompile compiles the given files, or standard input if none are listed, into a single output script. Files may be plain text or other compiled scripts.[1]

Documentation

Syntax

osacompile [PARAMETER ...] [FILE]

Parameters

-l LANGUAGE
Override the LANGUAGE for any plain text files. Normally, plain text files are compiled as AppleScript.
-o FILE
Place the output in the FILE name. If -o is not specified, the resulting script is placed in the file a.scpt.
-x
Save the resulting script as execute-only.

Examples

Compile all AppleScript files in the current directory and its subdirectories
find '.' -iname '*.applescript' -print0 \
| sed --null-data --quiet 'h; s/applescript$/scpt/I; p; g; p' \
| xargs --max-lines=2 --max-procs=5 --null osacompile -x -o

References

  1. 1.0 1.1 man 1 'osacompile'