Skip to content

Instantly share code, notes, and snippets.

@Con-Mi
Created September 17, 2018 08:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Con-Mi/7474a53e72634d23970f57aaacc2488d to your computer and use it in GitHub Desktop.
Save Con-Mi/7474a53e72634d23970f57aaacc2488d to your computer and use it in GitHub Desktop.
Shell script to install Google test library for Ubuntu.
#!bin/bash
TEST_RESET='/e[0m'
TEST_YELLOW='/e[1;33m'
sudo apt-get install libgtest-dev
echo -e $TEST_YELLOW
echo "APT fininshed installing Google Tests.."
echo -e $TEST_RESET
cd /usr/src/gtest
echo -e $TEST_YELLOW
echo "Changed directory to /usr/src/gtest .."
echo -e $TEST_RESET
sudo cmake CMakeLists.txt
echo -e $TEST_YELLOW
echo "cmake finished creating makefiles.. "
echo -e $TEST_RESET
sudo make -j4
echo -e $TEST_YELLOW
echo "Building finished.."
echo -e $TEST_RESET
sudo cp *.a /usr/lib
echo -e $TEST_YELLOW
echo "Copied binaries to usr/lib .."
echo -e $TEST_RESET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment