Created
February 4, 2014 18:49
-
-
Save doi-t/8809826 to your computer and use it in GitHub Desktop.
gtestを/usr/local以下にインストール/アンインストールするシェルスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
version=gtest-1.7.0 | |
root=/usr/local | |
sudo apt-get install cmake | |
wget https://googletest.googlecode.com/files/$version.zip -P ~ | |
(cd ~; unzip ${version}.zip;) | |
(cd ~/$version; cmake .; make;) | |
sudo mkdir -p "$root/$version/lib" | |
sudo cp -r ~/$version/include "$root/$version/" | |
sudo cp ~/$version/libgtest*.a "$root/$version/lib" | |
sudo ln -s "$root/$version" "$root/gtest" | |
#rm -rf ~/$version* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo rm -rf /usr/local/gtest* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment