=================================================================== RCS file: /cvs/wpscripts/zlist/zlist,v retrieving revision 1.4 retrieving revision 1.6 diff -u -r1.4 -r1.6 --- wpscripts/zlist/zlist 2011/07/19 17:02:54 1.4 +++ wpscripts/zlist/zlist 2011/07/25 14:28:51 1.6 @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: zlist,v 1.4 2011/07/19 17:02:54 yason Exp $ +# $Id: zlist,v 1.6 2011/07/25 14:28:51 yason Exp $ use DBI; use Term::ANSIColor qw(:constants); use Time::HiRes qw(gettimeofday tv_interval); @@ -80,7 +80,7 @@ # fetch probas - db_fetch(2); + db_fetch(1); # print "****** probas ($#numcard) ******\n"; print BOLD WHITE ON_BLUE "Очередь цветопроб". RESET . " ($#numcard штук) :\n"; @@ -140,20 +140,15 @@ $searchpath = substr($path[$i], 13); # hardcoded - # remove first symbols to get only filename (i.e. \\fileserver\zayavki\ - 20 symbols) - $path[$i] = substr($path[$i], 21) if ($type_file == 0); -# $path[$i] = substr($path[$i], 34) if ($type_file == 1); -# $path[$i] = substr($path[$i], 34) if ($type_file == 2); + # remove first symbols to get only filename (i.e. \\fileserver\zayavki\ - 21 symbols) + $path[$i] = substr($path[$i], 21) if ($type_file == 0); #zayavki + $path[$i] = substr($path[$i], 19) if ($type_file == 1); #proba # make local file path $searchpath =~ tr/\\/\//; $searchpath = '/mnt/maket/' . $searchpath; - -# # follow symlink to achieve real path -# chomp( $_ = `dirname $searchpath | xargs /usr/bin/readlink` ); chomp( $searchpath = $_ . '/' . `basename $searchpath` ); - # finally, get file size $size[$i] = -s $searchpath; $size[$i] = ($size[$i] > 1048576 ? int($size[$i] / 1024 / 1024) . " MB" : int($size[$i] / 1024) . " KB");