Magellan Linux

Contents of /trunk/depend-tools/check_arch.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 382 - (show annotations) (download) (as text)
Mon Jun 12 16:22:01 2006 UTC (17 years, 10 months ago) by niro
File MIME type: application/x-sh
File size: 415 byte(s)
arch check script

1 #!/bin/bash
2
3 usage()
4 {
5 echo
6 echo "Usage:"
7 echo " $(basename $0) /path/to arch"
8 echo
9 echo " supported arches are 32 and 64 -bit"
10 echo " e.g. search for 64-bit files"
11 echo " $(basename $0) /var/tmp/magebuild/builded 64"
12 echo
13 exit 1
14 }
15
16 [[ $# -lt 2 ]] && usage
17 [[ $2 != 32 ]] && [[ $2 != 64 ]] && usage
18
19 for i in $(find $1 -type f)
20 do
21 [[ -n $(file ${i} | grep "$2-bit") ]] && echo "$2-bit: ${i}"
22 done