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