Skip to content

Instantly share code, notes, and snippets.

@tjw
Created February 25, 2011 00:40
Show Gist options
  • Save tjw/843205 to your computer and use it in GitHub Desktop.
Save tjw/843205 to your computer and use it in GitHub Desktop.
Go beyond the release notes!
#!/bin/zsh -f
set -e
PKG_DIR=/tmp/SystemHeaders-`uname -r`
echo "Packaging $PKG_DIR..."
mkdir -p $PKG_DIR
cd /
for d in System/Library/Frameworks usr/include Developer/Library/Frameworks usr/lib; do
echo " ... $d"
mkdir -p "$PKG_DIR/$d"
rsync -avP --exclude Resources --include "*/" --include "*.h" --exclude "*" --delete-excluded $d/ $PKG_DIR/$d/
done
cd $PKG_DIR:h
rm -f "$PKG_DIR:t".zip
zip -r "$PKG_DIR:t".zip $PKG_DIR:t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment