source: soft/build_system/build_system/upload/robot/trunk/test.sh @ 1

Last change on this file since 1 was 1, checked in by fasma, 13 years ago

Initial Import from Mandriva's soft revision 224062 and package revision 45733

File size: 808 bytes
Line 
1#!.usr/bin/perl
2
3f() {
4
5a=${10}
6
7echo $1 $2 $3 $4 $5 $6 $7 $8 $9 A [$a]
8
9}
10
11f a 2 3 4 5 6 7 8 9 to
12
13exit
14
15check_bad_version() {
16
17file=$1
18dir=$2
19freeze=$3
20new=$4
21srpm=$5
22
23if [ $new != 0 ]; then                 
24    if [ -z $srpm ]; then
25         target=`rpm -qp --queryformat '%{NAME}' $file`
26         echo "TARGET $target"
27         if ls $dir/${target}* > /dev/null 2>&1; then
28              return 1
29         else
30              return 0
31         fi           
32    else   
33         target=`rpm -qp --qf '%{SOURCERPM}' $file | sed 's/-[^-]\+-[^-]\+.src.rpm//'`
34         echo "TARGET $target"
35         if ls $srpm/${target}* > /dev/null 2>&1; then
36              return 1
37         else
38              return 0
39         fi   
40    fi     
41fi 
42}
43
44if check_bad_version $1 $2 $3 $4 $5; then
45        echo "pas bon\n"
46else
47        echo "OK\n"
48fi
Note: See TracBrowser for help on using the repository browser.