scripts/build: cleanup

This commit is contained in:
Stefan Saraev 2016-10-02 17:17:47 -07:00 committed by Lukas Rusak
parent 26d5070286
commit c468820ba9
No known key found for this signature in database
GPG Key ID: 8C310C807E7393A3

View File

@ -327,31 +327,30 @@ if [ ! -f $STAMP ]; then
fi
if [ "$TARGET" = "target" -o "$TARGET" = "init" ]; then
if [ -d $INSTALL ] ; then
for i in $INSTALL $INSTALL/usr; do
rm -rf $i/include
rm -rf $i/lib/cmake
rm -rf $i/lib/pkgconfig
rm -rf $i/man
rm -rf $i/share/aclocal
rm -rf $i/share/bash-completion
rm -rf $i/share/doc
rm -rf $i/share/gtk-doc
rm -rf $i/share/info
rm -rf $i/share/locale
rm -rf $i/share/man
rm -rf $i/share/pkgconfig
find $i -name "*.la" -exec rm -f "{}" ";" 2>/dev/null || true
find $i -name "*.a" -exec rm -f "{}" ";" 2>/dev/null || true
find $i -name "*.so*T" -exec rm -f "{}" ";" 2>/dev/null || true
# patch backups nonsense
find $i -name "*.orig" -exec rm -f "{}" ";" 2>/dev/null || true
# kodi / addons nonsense
find $i -name "addon.xml.in" -exec rm -f "{}" ";" 2>/dev/null || true
find $i -name "Makefile.in" -exec rm -f "{}" ";" 2>/dev/null || true
done
find $INSTALL -type d -exec rmdir -p "{}" ";" 2>/dev/null || true
if [ -d $INSTALL ] ; then
rm -rf $INSTALL/{usr/,}include
rm -rf $INSTALL/{usr/,}lib/cmake
rm -rf $INSTALL/{usr/,}lib/pkgconfig
rm -rf $INSTALL/{usr/,}man
rm -rf $INSTALL/{usr/,}share/aclocal
rm -rf $INSTALL/{usr/,}share/bash-completion
rm -rf $INSTALL/{usr/,}share/doc
rm -rf $INSTALL/{usr/,}share/gtk-doc
rm -rf $INSTALL/{usr/,}share/info
rm -rf $INSTALL/{usr/,}share/locale
rm -rf $INSTALL/{usr/,}share/man
rm -rf $INSTALL/{usr/,}share/pkgconfig
rm -rf $INSTALL/{usr/,}share/zsh
rm -rf $INSTALL/{usr/,}var
find $INSTALL \( -name "*.orig" \
-o -name "*.rej" \
-o -name "*.a" \
-o -name "*.la" \
-o -name "*.o" \
-o -name "*.in" \
-o -name ".git*" \) \
-exec rm -f {} \; 2>/dev/null || :
find $INSTALL -type d -exec rmdir -p {} \; 2>/dev/null || :
if [ ! "$DEBUG" = yes ]; then
$STRIP `find $INSTALL \