author | schurig <schurig> | 2003-06-06 14:42:22 (UTC) |
---|---|---|
committer | schurig <schurig> | 2003-06-06 14:42:22 (UTC) |
commit | 923ca7f364bbbece39bcc99d2e5e6a5716bd835b (patch) (side-by-side diff) | |
tree | 6f6c820e132d796bc6404c3d8bba2d1062384cc3 /scripts | |
parent | 802e9457b1bc158c61849755215fe2a5bad6231d (diff) | |
download | opie-923ca7f364bbbece39bcc99d2e5e6a5716bd835b.zip opie-923ca7f364bbbece39bcc99d2e5e6a5716bd835b.tar.gz opie-923ca7f364bbbece39bcc99d2e5e6a5716bd835b.tar.bz2 |
don't pack CVS directories into IPKs
-rwxr-xr-x | scripts/mkipkg | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/mkipkg b/scripts/mkipkg index 9c5e184..43bd3a3 100755 --- a/scripts/mkipkg +++ b/scripts/mkipkg @@ -290,96 +290,99 @@ substFiles() substAndStripFiles() { for f in $1; do stripFile ./$f substFile ./$f $2 done } installScript() { if [ -n "$1" -a -f "$1" ]; then destfile=`basename $1` filetype=`echo $destfile|cut -d. -f2` if [ -n "$filetype" ]; then destfile=$filetype; fi if [ -n "$subst" ]; then sed -f $subst < $1 > $ctrldir/$destfile else cat $1 > $ctrldir/$destfile fi chmod +x $ctrldir/$destfile fi } tempDir=/tmp/`basename $self`.$$ mkdir -p $tempDir if [ $? != 0 ]; then echo "$self: cannot create $tempDir, exiting..." rm -rf $tempDir exit 1 fi ctrldir=$tempDir/CONTROL mkdir -p $ctrldir if [ ! -e $subst ] || [ -z "$subst" ]; then cat $control > $ctrldir/control.new else sed -f $subst < $control > $ctrldir/control.new fi createFileList $ctrldir/control.new ipkgFileList if [ "$?" != "0" ]; then echo "$self: ERROR: missing files, not building $control" rm -rf $tempDir exit 1 fi cat $ctrldir/control.new | egrep -v '^(Files|FileExcludeMask|FileIncludeMask):' > $ctrldir/control rm -f $ctrldir/control.new ( cd $destdir && tar -cf - $ipkgFileList 2>/dev/null ) | ( cd $tempDir && tar -xf - 2>/dev/null ) if [ -z "$filesubst" ]; then ( cd $tempDir && stripFiles "$ipkgFileList" ) else if ! (echo $filesubst|grep -q '^/'); then filesubst="$oldpwd/$filesubst" fi ( cd $tempDir && substAndStripFiles "$ipkgFileList" $filesubst ) fi +# removing CVS directories +find $tempDir -name CVS -a -type d -print0 | xargs -0 rm -rf + path="`echo "$PATH" | sed -e "s/\:/ /g"`" if [ -z "$mkfsjffs2" ]; then for i in $path; do if [ -x "$i/mkfs.jffs2" ]; then mkfsjffs2="$i/mkfs.jffs2" break fi done fi if [ -z "$mkfsjffs2" ]; then echo "$self: WARNING: no mkjfs.jffs2 found in path. Falling back to using du" echo "for size calculation. mkfs.jffs2 is recommended for size calculation" echo "as it calculates the real package size on the compressed file system," echo "in contrast to du calculating the uncompressed size!" buildsize=`du -h -s $tempDir | awk '{print $1}'` else buildsize=`$mkfsjffs2 -r $tempDir | wc -c` fi if [ "$buildsize" != "0" ]; then echo "Installed-Size: $buildsize" >> $ctrldir/control fi installScript $preinst installScript $postinst installScript $prerm installScript $posrm $ipkgbuild $classic -o $user -g $group $tempDir rm -rf $tempDir |