blob: 1c991624eed2fe8b9e4b9f07216e0d60e5f90256 (
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
|
#!/bin/bash
cat > js/line_counts.php <<EOF
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* An autogenerated file that stores the line counts of javascript files
*
* @package PhpMyAdmin
*/
if (! defined('PHPMYADMIN')) {
exit;
}
define('LINE_COUNTS', true);
\$LINE_COUNT = array();
EOF
php_code=""
for file in `find js -name '*.js'` ; do
lc=`wc -l $file | sed 's/\([0-9]*\).*/\1/'`
file=${file:3}
entry="\$LINE_COUNT[\"$file\"] = $lc;"
php_code="$php_code\n$entry"
done
echo -e $php_code >> js/line_counts.php
|