Magellan Linux

Contents of /trunk/pkgtools/svn-find-files-older-then-rev.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1965 - (show annotations) (download) (as text)
Wed Nov 7 09:27:10 2012 UTC (11 years, 5 months ago) by niro
File MIME type: application/x-sh
File size: 524 byte(s)
-added script to find files from rev tag
1 #!/bin/bash
2
3 LC_ALL=C
4
5 SEARCHPATH="$1"
6 COMPARE_REV="$2"
7
8 if [[ -z ${SEARCHPATH} ]]
9 then
10 echo "Usage: ${0##*/} SEARCHPATH COMPARE_REV"
11 echo "No path given!"
12 exit 1
13 fi
14
15 if [[ -z ${COMPARE_REV} ]]
16 then
17 echo "Usage: ${0##*/} SEARCHPATH COMPARE_REV"
18 echo "No path given!"
19 exit 1
20 fi
21
22 for file in $(find ${SEARCHPATH} -name *.smage2 | sort )
23 do
24 if svn info ${file} &> /dev/null
25 then
26 rev=$(svn info "${file}" | grep 'Changed Rev:' | sed 's:.*Rev\:\ \(.*\):\1:')
27 [[ ${rev} -lt ${COMPARE_REV} ]] && echo ${file}
28 fi
29 done
30

Properties

Name Value
svn:executable *