summaryrefslogtreecommitdiff
path: root/scripts/mkipkg
authorwimpie <wimpie>2004-04-02 16:49:47 (UTC)
committer wimpie <wimpie>2004-04-02 16:49:47 (UTC)
commit9e26c10c0dc97a0956d019166caf712955094764 (patch) (unidiff)
tree9bf4f33bd02185780070e178d25e24bdff4d6cd2 /scripts/mkipkg
parent2f2d702e37cc391dd547eaa7e2432d86285e546d (diff)
downloadopie-9e26c10c0dc97a0956d019166caf712955094764.zip
opie-9e26c10c0dc97a0956d019166caf712955094764.tar.gz
opie-9e26c10c0dc97a0956d019166caf712955094764.tar.bz2
ipkg-build mkipkg : speedup (avoid grepping over controlfile by loading into array)
SpeciapMTFiles tothreaded : convert control files to -mt.control
Diffstat (limited to 'scripts/mkipkg') (more/less context) (ignore whitespace changes)
-rwxr-xr-xscripts/mkipkg22
1 files changed, 11 insertions, 11 deletions
diff --git a/scripts/mkipkg b/scripts/mkipkg
index 43bd3a3..a336371 100755
--- a/scripts/mkipkg
+++ b/scripts/mkipkg
@@ -179,15 +179,15 @@ createFileList()
179 local includemaskpresent=0 179 local includemaskpresent=0
180 local excludemaskpresent=0 180 local excludemaskpresent=0
181 181
182 if (cat $1|grep -q ^FileExcludeMask); then 182 if (grep -q ^FileExcludeMask $1); then
183 excludemaskpresent=1 183 excludemaskpresent=1
184 excludeMask=$(eval echo '"'$(sed -n -e "s,^FileExcludeMask: *,,p" $1)'"') 184 excludeMask=$(eval echo '"'$(sed -n -e "s,^FileExcludeMask: *,,p" $1)'"')
185 fi 185 fi
186 if (cat $1|grep -q ^FileIncludeMask); then 186 if (grep -q ^FileIncludeMask $1); then
187 includemaskpresent=1 187 includemaskpresent=1
188 includeMask=$(eval echo '"'$(sed -n -e "s,^FileIncludeMask: *,,p" $1)'"') 188 includeMask=$(eval echo '"'$(sed -n -e "s,^FileIncludeMask: *,,p" $1)'"')
189 else 189 else
190 if (cat $1|grep -q ^Files:); then 190 if (grep -q ^Files: $1); then
191 includemaskpresent=1 191 includemaskpresent=1
192 includeMask=$(eval echo '"'$(sed -n -e "s,^Files: *,,p" $1)'"') 192 includeMask=$(eval echo '"'$(sed -n -e "s,^Files: *,,p" $1)'"')
193 fi 193 fi
@@ -195,7 +195,9 @@ createFileList()
195 195
196 _pushd $destdir 196 _pushd $destdir
197 197
198 excludeMask="$excludeMask CONTROL/* usr/share/*" 198 declare -a excludeMaskArray
199 excludeMaskArray=( $excludeMask )
200 excludeMaskArray=( "${excludeMaskArray[@]}" "CONTROL/*" "usr/share/*" )
199 201
200 if [ $includemaskpresent != 1 ]; then 202 if [ $includemaskpresent != 1 ]; then
201 includeMask="." 203 includeMask="."
@@ -209,21 +211,19 @@ createFileList()
209 211
210 expandMaskToList "$includeMask" _fileList 212 expandMaskToList "$includeMask" _fileList
211 213
212 _excludeList= 214 excludeMaskArray=( "${excludeMaskArray[@]}" "*/CVS*" "*/SCCS*" )
213 if [ -n "$excludeMask" ]; then
214 expandMaskToList "$excludeMask" _excludeList
215 _excludeList="$_excludeList `find -name \*CVS\* -o -name \*SCCS\*`"
216 fi
217 215
218 local realFileList= 216 local realFileList=
219 local missing=0 217 local missing=0
220 for file in $_fileList; do 218 for file in $_fileList; do
221 local containedInList=0 219 local containedInList=0
222 for i in $_excludeList; do 220 for i in "${excludeMaskArray[@]}"; do
223 if [ $file = $i ]; then 221 if [[ $file == $i ]]; then
224 containedInList=1 222 containedInList=1
223 break;
225 fi 224 fi
226 done 225 done
226
227 if [ $containedInList = 0 ]; then 227 if [ $containedInList = 0 ]; then
228 if ! [ -e $file -o -L $file ]; then 228 if ! [ -e $file -o -L $file ]; then
229 echo "$self: $file not found" 229 echo "$self: $file not found"