#!/bin/sh
base=4.0.3
rm -rf swift
mkdir swift
( cd swift
  git clone https://github.com/apple/swift.git
  ( cd swift && git co swift-$base-RELEASE )
  ./swift/utils/update-checkout --clone
)
date=`date '+%Y%m%d'`
tar cvf - --exclude .git swift | xz -9 >swift-$base-$date.tar.xz
rm -rf swift
