summaryrefslogtreecommitdiff
path: root/webapps/qooxdoo-0.6.3-sdk/frontend/demo/tool/layout.sh
blob: b30d283b65776d338bd0e118cdf5d1e0da7fca57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env bash

BASE="tool/layout.js.in"
DIST="$1"
SCAN="$2"
TITLE="$3"

mkdir -p `dirname $DIST`

cat $BASE > $DIST

showstr=""
for file in $SCAN/showcase/*.html ;
do
  if [ `basename $file` != "index.html" ]; then
    showstr="$showstr `basename $file`";
  fi
done
echo "var showstr = \"$showstr\";" >> $DIST

exastr=""
for file in $SCAN/example/*.html ;
do
  if [ `basename $file` != "index.html" ]; then
    exastr="$exastr `basename $file`";
  fi
done
echo "var exastr = \"$exastr\";" >> $DIST

perfstr=""
for file in $SCAN/performance/*.html ;
do
  if [ `basename $file` != "index.html" ]; then
    perfstr="$perfstr `basename $file`";
  fi
done
echo "var perfstr = \"$perfstr\";" >> $DIST

teststr=""
for file in $SCAN/test/*.html ;
do
  if [ `basename $file` != "index.html" ]; then
    teststr="$teststr `basename $file`";
  fi
done
echo "var teststr = \"$teststr\";" >> $DIST

echo "showTestFiles();" >> $DIST

echo "})();" >> $DIST