2018-04-10 14:05:31 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Copyright 2018 Google Inc.
|
|
|
|
#
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
set -e
|
|
|
|
#set -x
|
|
|
|
|
2018-04-10 16:58:29 +00:00
|
|
|
here=$(cd $(dirname ${BASH_SOURCE[0]}) && pwd)
|
|
|
|
skcms=$(mktemp -d)
|
2018-04-11 17:47:58 +00:00
|
|
|
|
|
|
|
if [ "$#" == "0" ]; then
|
|
|
|
git clone --quiet --depth 1 https://skia.googlesource.com/skcms.git $skcms
|
|
|
|
else
|
|
|
|
git clone --quiet https://skia.googlesource.com/skcms.git $skcms
|
|
|
|
git -C $skcms checkout $1
|
|
|
|
fi
|
2018-04-10 14:05:31 +00:00
|
|
|
|
2018-04-10 16:58:29 +00:00
|
|
|
git rm --quiet $here/LICENSE
|
|
|
|
git rm --quiet $here/skcms.h
|
|
|
|
git rm --quiet $here/skcms.c
|
|
|
|
git rm --quiet -r $here/src
|
2018-04-10 14:05:31 +00:00
|
|
|
|
2018-04-10 16:58:29 +00:00
|
|
|
cp $skcms/LICENSE $here
|
|
|
|
cp $skcms/skcms.h $here
|
|
|
|
cp $skcms/skcms.c $here
|
|
|
|
cp -r $skcms/src $here
|
2018-04-10 14:05:31 +00:00
|
|
|
|
2018-04-10 16:58:29 +00:00
|
|
|
git add $here
|
|
|
|
git commit -m "skcms→$(git -C $skcms log -1 --pretty=format:'%h %s')"
|
2018-04-10 14:05:31 +00:00
|
|
|
|
2018-04-10 16:58:29 +00:00
|
|
|
rm -rf $skcms
|