Debian Codegraph @

test/ruby-sass/ruby-sass.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 # CONSTANTS
4
5 TEST_DIR=$(dirnamescip-shell system . . dirname. $BASH_SOURCE)
6 FILES=$TEST_DIR/sass/*
7 CSS_DIR=$TEST_DIR/build
8 CSS_FILES=$TEST_DIR/build/*.css
9 SASS_OPTIONS=--sourcemap=none
10
11 # FUNCTIONS
12
13 build_sassscip-shell shell shell-project 0.0.0 build_sass().()
14 {
15 echoscip-shell system . . echo. "Processing $1 file…"
16
17 local fileName=$(basenamescip-shell system . . basename. -- "$1")
18 local name="${fileName%.*}"
19 local destFile="$CSS_DIR/$name.css"
20
21 sass "$1" "${destFile}"
22 }
23
24 build_all_css_filesscip-shell shell shell-project 0.0.0 build_all_css_files().()
25 {
26 rmscip-shell system . . rm. -r $CSS_DIR
27
28 if [scip-shell system . . `[`. ! -d "${CSS_DIR}" ]; then
29 echoscip-shell system . . echo. "Creating $CSS_DIR directory…"
30 mkdirscip-shell system . . mkdir. -p "${CSS_DIR}"
31 fi
32
33 if [scip-shell system . . `[`. $1 ]
34 then
35 build_sassscip-shell shell shell-project 0.0.0 build_sass(). $1
36 else
37 for f in $FILES
38 do
39 build_sassscip-shell shell shell-project 0.0.0 build_sass(). $f
40 done
41 fi
42 }
43
44 check_keywords_inclusionscip-shell shell shell-project 0.0.0 check_keywords_inclusion().()
45 {
46 for f in $CSS_FILES
47 do
48 BASE=$(basenamescip-shell system . . basename. $f)
49 KEYWORDS_FILE=$TEST_DIR/keywords/$BASE.txt
50 while read p; do
51 if ! grepscip-shell system . . grep. -q "$p" "$f"
52 then
53 # echo "Ok"
54 # else
55 echoscip-shell system . . echo. "$p not found in $f"
56 fi
57 # echo "Checking for $p "
58 done < $KEYWORDS_FILE
59 done
60 }
61
62 # EXECUTION
63
64 build_all_css_filesscip-shell shell shell-project 0.0.0 build_all_css_files(). $@
65 check_keywords_inclusionscip-shell shell shell-project 0.0.0 check_keywords_inclusion(). $@