~ubuntu-branches/debian/sid/kexi/sid

« back to all changes in this revision

Viewing changes to devtools/scripts/show_duplicated_service_names.sh

  • Committer: Package Import Robot
  • Author(s): Pino Toscano
  • Date: 2017-06-24 20:10:10 UTC
  • Revision ID: package-import@ubuntu.com-20170624201010-5lrzd5r2vwthwifp
Tags: upstream-3.0.1.1
ImportĀ upstreamĀ versionĀ 3.0.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# Shows services that have the same name as other services
 
3
 
 
4
function desktop_files()
 
5
{
 
6
    find . -name \*.desktop
 
7
}
 
8
 
 
9
function duplicates()
 
10
{
 
11
    for f in $(desktop_files) ; do
 
12
        grep "^Type=Service\$" $f -q && a=`grep ^Name= $f` && echo $a
 
13
    done | sort | uniq -d | while read a ; do echo -n "^$a\$|" ; done
 
14
}
 
15
 
 
16
filter=$(duplicates)__dummy__
 
17
egrep "$filter" $(desktop_files)