From 439a94c41d4c9e1473d9614a5f94dd30064f7d50 Mon Sep 17 00:00:00 2001 From: Philippe Coval Date: Tue, 25 Jul 2017 18:13:18 +0200 Subject: [PATCH] yaml: Add scriptlet to clone before scons Bug: https://jira.iotivity.org/browse/IOT-1760 Change-Id: Ief605d40b83d437df4049d18af7188eaea0ecbcb Signed-off-by: Philippe Coval Reviewed-on: https://gerrit.iotivity.org/gerrit/21623 Tested-by: jenkins-iotivity Reviewed-by: Dan Mihai (cherry picked from commit 286bc151acf0e8f2b67932d0fca2405cc859375e) Reviewed-on: https://gerrit.iotivity.org/gerrit/22079 Reviewed-by: Mats Wichmann --- extlibs/yaml/prep.sh | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100755 extlibs/yaml/prep.sh diff --git a/extlibs/yaml/prep.sh b/extlibs/yaml/prep.sh new file mode 100755 index 0000000..0727303 --- /dev/null +++ b/extlibs/yaml/prep.sh @@ -0,0 +1,80 @@ +#!/bin/bash +#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + + +set -e + +[ ! -z ${EXEC_MODE} ] || EXEC_MODE=false + +topdir="${PWD}" + +# Keep packageRevision in sync with SConscript's setting +# Right now this script assumes packageRevision is a tag; +# comment out the second clause +# if packageRevision becomes a branch or a specific commit. +package="yaml" +packageUrl="https://github.com/jbeder/yaml-cpp" +packageDir="./extlibs/${package}/${package}" +packageVersion="master" +# TODO: pin +packageRevision="$packageVersion" + + +do_() +{ + set +f + if $EXEC_MODE; then + echo "warning: fetching online resources may not be reproductible" + printf "%s \n" "trying: \"$@\"" + eval "$@" + else +cat<