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 | |
set -e | |
parse_json() { echo "$1" | sed -e 's/[{}]/''/g' | sed -e 's/", "/'\",\"'/g' | sed -e 's/" ,"/'\",\"'/g' | sed -e 's/" , "/'\",\"'/g' | sed -e 's/","/'\"---SEPERATOR---\"'/g' | awk -F=':' -v RS='---SEPERATOR---' "\$1~/\"$2\"/ {print}" | sed -e "s/\"$2\"://" | tr -d "\n\t" | sed -e 's/\\"/"/g' | sed -e 's/\\\\/\\/g' | sed -e 's/^[ \t]*//g' | sed -e 's/^"//' -e 's/"$//'; } | |
chk_command() { | |
if ! command -v "$1" &>/dev/null; then | |
echo "missing clef: $1" | |
exit 1 | |
fi |
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
yum -y groupinstall 'Development Tools' | |
yum -y install wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel rpmdevtools | |
OPENSSL="openssl-1.0.2j" | |
NGINX_VERSION="1.11.6-1" | |
rpm -ivh http://nginx.org/packages/mainline/centos/7/SRPMS/nginx-$NGINX_VERSION.el7.ngx.src.rpm | |
rpm -ivh http://nginx.org/packages/mainline/centos/7/SRPMS/nginx-module-geoip-$NGINX_VERSION.el7.ngx.src.rpm | |
rpm -ivh http://nginx.org/packages/mainline/centos/7/SRPMS/nginx-module-image-filter-$NGINX_VERSION.el7.ngx.src.rpm | |
rpm -ivh http://nginx.org/packages/mainline/centos/7/SRPMS/nginx-module-njs-1.11.6.0.1.4-2.el7.ngx.src.rpm |
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
1 sudo yum install make conf automake gcc g++ | |
3 sudo yum install vim | |
4 git clone http://cs140.stanford.edu/pintos.git | |
6 sudo yum install git | |
7 git clone http://cs140.stanford.edu/pintos.git | |
9 cd pintos/ | |
10 sudo bash -c 'echo -e "\nexport PINTOSDIR="`pwd`"/\n" >> /etc/profile' && source /etc/profile | |
12 echo $PINTOSDIR | |
13 cd ../ | |
14 ls |