1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-31 10:54:46 +03:00
Files
phpmyadmin/scripts/line-counts.sh
Michal Čihař 43a199bdca Use single quotes for filename
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-28 08:15:04 +02:00

27 lines
531 B
Bash
Executable File

#!/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