#!/bin/bash
if [ -z $1 ]; then
echo "No path specified: use \"trim [PATH_TO_SOURCE_TOP_DIR]\"";
exit 1;
fi
# remove all binaries and other unnecessary things
echo "Trimming directories..."
DIRS="win_build android client/os2 client/win client/android clientgui/mac clienttray lib/mac mac_build mac_installer zip/zip/macos zip/zip/win32 zip/unzip/macos zip/unzip/win32 stripchart coprocs"
for DIR in $DIRS; do
/bin/rm -rf $1/$DIR;
echo $1/$DIR;
done
echo "Trimming wxWidgets translations..."
# remove wxWidgets translations
find $1/locale -name wxstd.mo -delete
echo "Removing non-free code..."
# remove non-free code (see BZ#894290)
rm samples/glut/glut.h
rm samples/glut/glut_roman.c
rm samples/glut/glut_stroke.c
rm samples/glut/glut_swidth.c
rm samples/glut/glutbitmap.h
rm samples/glut/glutint.h
rm samples/glut/glutstroke.h
rm samples/glut/glutwin32.h
rm samples/glut/win32_glx.c
rm samples/glut/win32_glx.h
rm samples/glut/win32_util.c
rm samples/glut/win32_x11.c
rm samples/glut/win32_x11.h
echo "Done."