PageRenderTime 402ms CodeModel.GetById 181ms app.highlight 2ms RepoModel.GetById 139ms app.codeStats 0ms

/tools/cross-build/makedist.sh

http://ftk.googlecode.com/
Shell | 39 lines | 27 code | 9 blank | 3 comment | 3 complexity | 80c9905a092502e41288755947aa2df3 MD5 | raw file
 1#!/bin/bash
 2
 3STRIP=${TARGET_CC/gcc/strip}
 4
 5echo "Copy files to dist directory..."
 6rm -rf ${DIST}
 7mkdir -p ${DIST}
 8cp -rf ${STAGING}/* ${DIST}/.
 9
10cd ${DIST}
11#####################################################
12echo "Remove noused files..."
13find -name man      | xargs rm -rf
14find -name \*config | xargs rm -rf
15find -name aclocal  | xargs rm -rf
16find -name include  | xargs rm -rf
17
18for EXT in a h la
19do 
20	find -name \*.${EXT} | xargs rm -rf
21done
22
23######################################################
24echo "Strip($STRIP)..."
25for f in ${DIST}${PREFIX}"/lib/"*.so.*
26do
27	$STRIP $f
28done
29
30for f in ${DIST}${PREFIX}"/bin/"*
31do
32	$STRIP $f
33done
34
35echo "Make tar..."
36tar czf ${DIST}"/ftk-dist.tar.gz" "."${PREFIX}
37
38echo Distribute package is: ${DIST}"/ftk-dist.tar.gz"
39