cookutils diff cook @ rev 244
cook: improve source extracting, may be one file (Thanks Godane)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat May 28 00:41:01 2011 +0200 (2011-05-28) |
parents | 7484825355cc |
children | 6b819745d7da |
line diff
1.1 --- a/cook Fri May 27 19:18:56 2011 +0100 1.2 +++ b/cook Sat May 28 00:41:01 2011 +0200 1.3 @@ -565,7 +565,9 @@ 1.4 cd $pkgdir/source/tmp 1.5 # Some archives are not well done and don't extract to one dir (ex lzma). 1.6 files=$(ls | wc -l) 1.7 - [ "$files" == 1 ] && mv * ../$PACKAGE-$VERSION 1.8 + [ "$files" == 1 ] && [ -d "$(ls)" ] && mv * ../$PACKAGE-$VERSION 1.9 + [ "$files" == 1 ] && [ -f "$(ls)" ] && mkdir -p ../$PACKAGE-$VERSION && \ 1.10 + mv * ../$PACKAGE-$VERSION/$TARBALL 1.11 [ "$files" -gt 1 ] && mkdir -p ../$PACKAGE-$VERSION && \ 1.12 mv * ../$PACKAGE-$VERSION 1.13 cd .. && rm -rf tmp