Skip to content

Instantly share code, notes, and snippets.

@riccardobl
Created February 22, 2017 10:05
Show Gist options
  • Save riccardobl/a75524a780e8cb36358406a52ce09471 to your computer and use it in GitHub Desktop.
Save riccardobl/a75524a780e8cb36358406a52ce09471 to your computer and use it in GitHub Desktop.
#!/bin/bash
rm -rf apitrace/
sudo apt-get update
sudo apt-get install -y build-essential cmake git python libpng-dev zlib1g-dev libx11-dev libprocps-dev libdwarf-dev qtbase5-dev
git clone https://github.com/apitrace/apitrace.git
cd apitrace
if [ "$1" = "install" ];
then
cmake -H. -Bbuild -DENABLE_GUI=TRUE -DCMAKE_BUILD_TYPE=Release
make -C build
cd build
sudo make install
else
mkdir -p dist
cmake -H. -Bbuild -DENABLE_GUI=TRUE -DCMAKE_INSTALL_PREFIX=./dist -DCMAKE_BUILD_TYPE=Release
make -C build
cd build
make install
cd ../dist
tar -czvf "../apitrace_`date '+%Y-%m-%d'`-master.tar.gz" *
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment