public
Description: Git mirror of the CMS Made Simple 2.0 rewrite
Homepage: http://cmsmadesimple.org
Clone URL: git://github.com/tedkulp/cmsmadesimple-2-0.git
Search Repo:
cmsmadesimple-2-0 / admin / lang / sort.sh
100755 14 lines (12 sloc) 0.355 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh
 
# Shell script to sort all entries so they're easier to read
 
for file in `find . -name "admin.inc.php"`
do
  echo $file " "
  echo "<?php" > ${file}.new
  cat $file | grep -v '$lang' | grep -v '?>' | grep -v "<?" >> ${file}.new
  cat $file | grep '$lang' | sort | uniq >> ${file}.new
  echo "?>" >> ${file}.new
  rm $file
  mv ${file}.new $file
done