Permalink
Browse files

Can unpack xcode-4.1 for snow leopard

  • Loading branch information...
1 parent fd306d2 commit 892f6be081f0b108ebdbeb44ecb9173da544f14f @shinh committed Nov 12, 2011
Showing with 20 additions and 4 deletions.
  1. +20 −4 unpack_xcode.sh
View
@@ -39,21 +39,37 @@
set -e
-PKGS="MacOSX10.6 gcc4.2 gcc4.0 llvm-gcc4.2 DeveloperToolsCLI clang"
-
dmg=$1
dir=`basename $dmg .dmg`
+if echo $dmg | grep xcode_4.1; then
+ PKGS="MacOSX10.6 gcc4.2 llvm-gcc4.2 DeveloperToolsCLI clang"
+ XCODE=xcode_4.1
+ PKG_DIR="Applications/Install Xcode.app/Contents/Resources/Packages"
+elif echo $dmg | grep xcode_3; then
+ PKGS="MacOSX10.6 gcc4.2 gcc4.0 llvm-gcc4.2 DeveloperToolsCLI clang"
+ XCODE=xcode_3
+ PKG_DIR="*/Packages"
+else
+ PKGS="MacOSX10.6 gcc4.2 llvm-gcc4.2 DeveloperToolsCLI clang"
+ XCODE=xcode_4.0
+ PKG_DIR="*/Packages"
+fi
+
rm -fr $dir
mkdir $dir
cd $dir
7z x ../$dmg
7z x 5.hfs
+if [ $XCODE = "xcode_4.1" ]; then
+ 7z x -y "Install Xcode/InstallXcode.pkg"
+ 7z x -y InstallXcode.pkg/Payload
+fi
+
for pkg in $PKGS; do
- # Xcode4 doesn't have gcc4.0
- 7z x -y */Packages/$pkg.pkg || continue
+ 7z x -y "$PKG_DIR/$pkg.pkg"
7z x -y Payload
mkdir -p $pkg
cd $pkg

0 comments on commit 892f6be

Please sign in to comment.