OLD | NEW |
(Empty) | |
| 1 #!/bin/bash |
| 2 |
| 3 DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 4 cd $DIR |
| 5 TARGET_DIR=$DIR/wpt |
| 6 REMOTE_REPO="https://chromium.googlesource.com/external/w3c/web-platform-tests.g
it" |
| 7 WPT_HEAD="aa3fb4a1d10af0bafca022b069a61c8120ceaf43" |
| 8 |
| 9 # Remove if already exists. |
| 10 [ -d "$TARGET_DIR" ] && rm -rf $TARGET_DIR |
| 11 |
| 12 # Clone the entire thingy. |
| 13 git clone $REMOTE_REPO $TARGET_DIR |
| 14 cd $TARGET_DIR && git checkout $WPT_HEAD |
| 15 |
| 16 # Grab all submodules. |
| 17 while read dir submodule commit; do |
| 18 echo |
| 19 echo "Working in $dir on submodule $submodule. Setting head to: $commit" |
| 20 cd $TARGET_DIR/$dir && \ |
| 21 git submodule update --init $submodule && \ |
| 22 cd $TARGET_DIR/$dir/$submodule && \ |
| 23 git checkout $commit |
| 24 done < $DIR/WPTSubmodules |
| 25 |
| 26 # Remove all except white list. |
| 27 cd $TARGET_DIR |
| 28 rm -rf $(ls | grep -w -ve "$(cat $DIR/WPTWhiteList)") |
| 29 |
| 30 # Remove the .git dirs. |
| 31 rm -rf $TARGET_DIR/.git $TARGET_DIR/tools/.git $TARGET_DIR/tools/wptserve/.git |
| 32 |
| 33 # TODO(burnik): Handle the SSL certs. |
OLD | NEW |