8b2a9c7
#!/bin/sh
8b2a9c7
8b2a9c7
VERSION=$1
8b2a9c7
8b2a9c7
tar -xzvf phd2-$VERSION.tar.gz
8b2a9c7
8b2a9c7
#Remove pre-built software
8b2a9c7
rm -rf phd2-$VERSION/WinLibs
8b2a9c7
rm -rf phd2-$VERSION/extra_frameworks
8b2a9c7
rm -rf phd2-$VERSION/thirdparty/*.zip
8b2a9c7
rm -rf phd2-$VERSION/thirdparty/*.tar.gz
8b2a9c7
rm -rf phd2-$VERSION/thirdparty/*.tar.bz2
8b2a9c7
rm -rf phd2-$VERSION/thirdparty/frameworks
8b2a9c7
rm -rf phd2-$VERSION/thirdparty/HID_Utilities
8b2a9c7
rm -rf phd2-$VERSION/thirdparty/include
8b2a9c7
rm -rf phd2-$VERSION/thirdparty/openssag
8b2a9c7
rm -rf phd2-$VERSION/thirdparty/VidCapture
8b2a9c7
find . -name "*.dll" -type f -delete
8b2a9c7
find . -name "*.lib" -type f -delete
8b2a9c7
find . -name "*.dylib" -type f -delete
8b2a9c7
find . -name "*.a" -type f -delete
8b2a9c7
find . -name "*.so" -type f -delete
8b2a9c7
rm -rf phd2-$VERSION/cameras/qhyccdlibs/qhyfirmware.zip
8b2a9c7
8b2a9c7
tar -cJvf phd2-$VERSION-purged.tar.xz phd2-$VERSION 
8b2a9c7
8b2a9c7
#Remove temporary directory
8b2a9c7
rm -rf phd2-$VERSION