Debian Codegraph @

src/libsass/script/ci-build-plugin

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 PLUGIN=$1
4 RUBY_BIN=ruby
5 SASS_SPEC_PATH=sass-spec
6 SASSC_BIN=sassc/bin/sassc
7 SASS_SPEC_SPEC_DIR=plugins/libsass-${PLUGIN}/test
8
9 if [scip-shell system . . `[`. -e ./tester ] ; then
10 SASSC_BIN=./tester
11 fi
12
13 if [scip-shell system . . `[`. -d ./build/lib ] ; then
14 cpscip-shell system . . cp. -a build/lib lib
15 fi
16
17 if [scip-shell system . . `[`. "x$1" == "x" ] ; then
18 echoscip-shell system . . echo. "No plugin name given"
19 exit 1
20 fi
21
22 if [scip-shell system . . `[`. "x$COVERAGE" == "0" ] ; then
23 unset COVERAGE
24 fi
25
26 export EXTRA_CFLAGS=""
27 export EXTRA_CXXFLAGS=""
28 if [scip-shell system . . `[`. "$TRAVIS_OS_NAME" == "osx" ]; then
29 # osx doesn't seem to know gcov lib?
30 export EXTRA_LDFLAGS="--coverage"
31 else
32 export EXTRA_LDFLAGS="-lgcov --coverage"
33 fi
34
35 mkdirscip-shell system . . mkdir. -p plugins
36 if [scip-shell system . . `[`. ! -d plugins/libsass-${PLUGIN} ] ; then
37 if [scip-shell system . . `[`. "$PLUGIN" == "tests" ]; then
38 gitscip-shell system . . git. clone https://github.com/mgreter/libsass-${PLUGIN} plugins/libsass-${PLUGIN} --branch master
39 else
40 gitscip-shell system . . git. clone https://github.com/mgreter/libsass-${PLUGIN} plugins/libsass-${PLUGIN}
41 fi
42 fi
43 if [scip-shell system . . `[`. ! -d plugins/libsass-${PLUGIN}/build ] ; then
44 mkdirscip-shell system . . mkdir. plugins/libsass-${PLUGIN}/build
45 fi
46 RETVAL=$?; if [scip-shell system . . `[`. "$RETVAL" != "0" ]; then exit $RETVAL; fi
47
48 cd plugins/libsass-${PLUGIN}/build
49 cmakescip-shell system . . cmake. -G "Unix Makefiles" -D LIBSASS_DIR="../../.." ..
50 RETVAL=$?; if [scip-shell system . . `[`. "$RETVAL" != "0" ]; then exit $RETVAL; fi
51 makescip-shell system . . make. VERBOSE=1 -j2
52 RETVAL=$?; if [scip-shell system . . `[`. "$RETVAL" != "0" ]; then exit $RETVAL; fi
53 cd ../../..
54
55 # glob only works on paths relative to imports
56 if [scip-shell system . . `[`. "x$PLUGIN" == "xglob" ]; then
57 ${SASSC_BIN} --precision 5 --plugin-path plugins/libsass-${PLUGIN}/build ${SASS_SPEC_SPEC_DIR}/basic/input.scss > ${SASS_SPEC_SPEC_DIR}/basic/result.css
58 ${SASSC_BIN} --precision 5 --plugin-path plugins/libsass-${PLUGIN}/build ${SASS_SPEC_SPEC_DIR}/basic/input.scss --sourcemap > /dev/nullscip-shell filesystem . . `/dev/null`.
59 else
60 catscip-shell system . . cat. ${SASS_SPEC_SPEC_DIR}/basic/input.scss | ${SASSC_BIN} --precision 5 --plugin-path plugins/libsass-${PLUGIN}/build -I ${SASS_SPEC_SPEC_DIR}/basic > ${SASS_SPEC_SPEC_DIR}/basic/result.css
61 catscip-shell system . . cat. ${SASS_SPEC_SPEC_DIR}/basic/input.scss | ${SASSC_BIN} --precision 5 --plugin-path plugins/libsass-${PLUGIN}/build -I ${SASS_SPEC_SPEC_DIR}/basic --sourcemap > /dev/nullscip-shell filesystem . . `/dev/null`.
62 fi
63 RETVAL=$?; if [scip-shell system . . `[`. "$RETVAL" != "0" ]; then exit $RETVAL; fi
64
65 diffscip-shell system . . diff. ${SASS_SPEC_SPEC_DIR}/basic/expected_output.css ${SASS_SPEC_SPEC_DIR}/basic/result.css
66 RETVAL=$?; if [scip-shell system . . `[`. "$RETVAL" != "0" ]; then exit $RETVAL; fi