Translated using Weblate (Armenian)
[phpmyadmin.git] / scripts / line-counts.sh
blob1c991624eed2fe8b9e4b9f07216e0d60e5f90256
1 #!/bin/bash
2 cat > js/line_counts.php <<EOF
3 <?php
4 /* vim: set expandtab sw=4 ts=4 sts=4: */
5 /**
6 * An autogenerated file that stores the line counts of javascript files
8 * @package PhpMyAdmin
9 */
11 if (! defined('PHPMYADMIN')) {
12 exit;
15 define('LINE_COUNTS', true);
16 \$LINE_COUNT = array();
17 EOF
19 php_code=""
20 for file in `find js -name '*.js'` ; do
21 lc=`wc -l $file | sed 's/\([0-9]*\).*/\1/'`
22 file=${file:3}
23 entry="\$LINE_COUNT[\"$file\"] = $lc;"
24 php_code="$php_code\n$entry"
25 done
26 echo -e $php_code >> js/line_counts.php