trim-app

If you can’t keep a tidy house hire professional cleaners.

Click here to download

This 1.3kb shell script does the following, so you don’t have to:

Remove useless junk

.DS_Store, pbdevelopment.plist, and other scourges cleaned up in milliseconds.

Finder creates hidden .DS_Store files in almost all folders you navigate to. This is a fault with the program, which is yet to be fixed. trim-app cleans up these irritating files from your binaries.

Trim universal binaries

Mach-O “fat files” trimmed from all embedded executables.

Chances are your users don’t have an Intel and PPC chip on the same machine - save yourself bandwidth costs and give them a smaller download by providing architecture specific builds as well as a “fat” universal download.

Strip debug symbols

Unnecessary code from your executables cleaned out.

Xcode leaves debug symbols in your compiled binaries. This is absolutely useless for your users, and should not be in your final release package.

Compile nibs

Slim, trim, and compiled.

Nib “files” are actually bundles which often contain up to three times as much information than required in your release package. trim-app selectively removes the data that are not required making your nibs much more compact.

Compress tiff images

Same clarity, much smaller file sizes using lzw compression.

Most images, espcially those in tiff format, carry a lot of additional data that does nothing but make the file size several times bigger than necessary. Using lzw compression, trim-app parses images in tiff format to optimize their file size whilst retaining their level of detail.

Remove resource forks

Search and destroy with extreme speed and efficiency.

Resource forks are seldom used anymore, and with good reason. If you’re not using these pesky things, trim-app clears them out while maintaining the files onto which they’re hooked.


Manual

Usage
trim-app
trim-app [--all (ppc | i386)] [-p]
trim-app [-a (ppc | i386)] [-s] [-n] [-d] [-t] [-p]
Options
--all 'architecture'
    Same as setting ‘-d -n -s -t -r’
    If architecture is set, strips universal binaries
    If architecture is omitted, this must be the last option
-p
    Print list of files affected
-d
    Remove .DS_Store files and pbdevelopment.plist
-a 'architecture'
    Strip universal binaries. Keep architecture specified, delete others
-s
    Strip debug symbols from binaries
-n
    Compile and trim nibs
-t
    Compress tiff images (lzw)
-r
    Remove resource forks
-- 'target'
    Runs specified options on file / folder ‘target’
    Must be the last option
Examples
 trim-app
Prompt for architecture and if not blank, clean out universal binaries
Strip debug symbols, remove junk files, trim nib files compress tiffs

    trim-app --all
Strip debug symbols, remove junk files, trim nib files, compress tiffs
Does not strip universal binaries

    trim-app --all ppc
Keep ppc code, remove intel code
Strip debug symbols, remove junk files, trim nib files, compress tiffs

    trim-app -t -- ~/Pictures/
Compress all tiff images in ~/Pictures/ directory

    sudo trim-app -d -- /
Remove .DS_Store files from entire hard drive

    trim-app -r
Remove all resource forks in current directory

    trim-app --all i386 -- /Applications/Xslimmer.app/
Run on Xslimmer.app: keep ppc code, remove intel code, strip debug symbols,
remove junk files, trim nib files, compress tiffs

Now updated in app form: Trimmit