File: search_pics.sh

package info (click to toggle)
qabcs 1.0.2-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 44,724 kB
  • sloc: cpp: 2,226; sh: 2,001; xml: 25; makefile: 5
file content (33 lines) | stat: -rwxr-xr-x 758 bytes parent folder | download | duplicates (3)
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
27
28
29
30
31
32
33
#/bin/sh
# Author: Alexey Loginov
# Licence: GPLv3+
# Description: searching for pictures that must be added based on properties files

lang="$1"

if [ -z "$lang" ]
then
   echo "Parameter 'lang' is mandatory!"
   exit 1
fi

pushd ..

file="abcs/$lang/abc*.properties"

if [ -z `find abcs/$lang -name *.properties` ]
then
  popd
  echo "File abcs/$lang/abc*.properties does not exist!"
  exit 1
fi

for filename in `cat $file|grep -v ^language|grep -v ^espeak_params|grep -v ^visible|grep -v ^author|grep -v ^inheritsFrom|grep -v ^view_letters|grep -v ^speak_method|grep -v ^typing|grep -v ^#|grep -v '\[missing\]'|sed "s|:.*=.*=.*=|:|g"|sort|cut -d ":" -f 2`
do
  if [ -z `find abcs/all/pics -name "$filename.*"` ]
  then
    echo $filename
  fi
done

popd