Last active
August 29, 2015 14:20
-
-
Save Pittan/2aa1eeddc20ff92128e8 to your computer and use it in GitHub Desktop.
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 | |
# | |
# Raspberry Piインストールスクリプト | |
# | |
#シェルスクリプトを書くときの頻出コードメモより | |
#http://lambdalisue.hatenablog.com/entry/2013/07/06/023040 | |
askYesOrNo() { | |
while true ; do | |
read -p "$1 (y/n)?" answer | |
case $answer in | |
[yY] | [yY]es | YES ) | |
return 0;; | |
[nN] | [nN]o | NO ) | |
return 1;; | |
* ) echo "Please answer yes or no.";; | |
esac | |
done | |
} | |
#==================================================================== | |
# aptのアップデート(時間かかります) | |
#==================================================================== | |
echo "Installing basic libraries... " | |
yes | sudo apt-get update | |
yes | sudo apt-get install ttf-kochi-gothic xfonts-intl-japanese xfonts-intl-japanese-big xfonts-kaname | |
#時間かかりすぎるのでパス | |
#yes | sudo apt-get upgrade | |
yes | sudo aptitude install libglib2.0-dev libdbus-1-dev libudev-dev libical-dev libreadline6-dev | |
echo "Installing bluez..." | |
wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.11.tar.gz | |
tar xvf bluez-5.11.tar.gz | |
cd bluez-5.11 | |
./configure --disable-systemd --enable-library | |
make | |
sudo make install | |
echo "Installing node.js..." | |
sudo wget http://node-arm.herokuapp.com/node_latest_armhf.deb | |
sudo dpkg -i node_latest_armhf.deb | |
askYesOrNo "Would you like to install vim settings?" | |
if [ $? -eq 0 ]; then | |
#vimrcの設定も同時に行います。 | |
yes | sudo apt-get install vim | |
cd | |
wget http://api.pittankopta.net/research/vimrc | |
mv ./vimrc $HOME/.vimrc | |
else | |
yes | sudo apt-get install vim | |
fi | |
echo "Preparing for git..." | |
yes | sudo apt-get install git-core | |
git config --global user.name "UserNameHere" | |
git config --global user.email [email protected] | |
echo "Cloning Repository from GitHub..." | |
git clone https://github.com/XXXXXXXXXXXXXXXXXXXXXXXX | |
echo "Done!! Please Reboot" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment