#!/bin/bash#by lcpanduan () {if [ $? -ne 0 ]then echo "=========== ====$1 not ok ==================== " exit 1fi}function checkroot () { if [ ' Id -u ' -ne 0 ] then echo ' pleases do this ' su -"' && exit 1 fi}function tarruby () { yum clean all wget -o /etc/ yum.repos.d/centos-base.repo http://mirrors.aliyun.com/repo/centos-6.repo yum -y install ruby ruby-devel rubygems make gcc libxml2-devel libxslt-devel git libicu* icu* #yum ruby, gem and related dependencies gem sources -a https://ruby.taobao.org #更新gem源 gem sources --remove http://rubygems.org/ panduan gem \curl -ssl https://get.rvm.io | bash #rvm source /etc/profile.d/rvm.sh #刷新rvm rpm -e libyaml-0.1.6-1.el6.x86_64 -- nodeps &>>/tmp/rvm.log #删除rvm执行rvm install 2.2.2 dependency packages for related conflicts panduan RVMCURL rvm install 2.2.2 #通过rvm更改ruby版本 (Gem only supports 1.9.2 and later versions) rvm use 2.2.2 --default #使更改生效 clear ruby -e ' p "Hello ruby" #测试ruby sLeep 3 panduan rvminstall}function gollom () { gem install gollum #gem安装软件 (e.g. Gollum) cd ~ #以下为针对gollum的操作 , cut home directory mkdir wiki #创建wiki目录 git init #初始化git生成. git files panduan gollum clear echo "##########################" echo " Gullum is ok " echo "##########################"}main () { checkroot tarruby Gollom}main
Shell's Gollum installation + comment