Run with ENV1.
% export ENV1=1
% /bin/sh ./test.sh
ENV1 found
a=1, b=2
% echo $?| require "celluloid/io" | |
| require "rb-inotify" | |
| require "forwardable" | |
| module Celluloid | |
| module IO | |
| class INotify | |
| extend Forwardable | |
| def_delegators :@notifier, :watch, :close |
| #!/bin/bash | |
| set -ue | |
| WATCH_PATH="config/db/migrations/" | |
| MASTER_BRANCH="$1" | |
| WORK_BRANCH="$2" | |
| join -1 4 -2 4 -a 2 <(git ls-tree $MASTER_BRANCH -- $WATCH_PATH) <(git ls-tree $WORK_BRANCH -- $WATCH_PATH) | \ | |
| awk '$4 != $7 {print $1 " is changed"; found++; } END{ if (found > 0){ exit 1; } }' |
| require 'spec_helper' | |
| feature "Feature1" do | |
| scenario "Scenario1" do | |
| step "Do something 1" | |
| step "Do something 2" | |
| step "Do something 3" | |
| step "Do something 4" | |
| end |
| #!/bin/sh | |
| awk 'BEGIN{blkline=0; skip=0; } | |
| $0 ~ /^## EXAMPLE:$/ && blkline == 1 { skip=1; } | |
| $0 ~ /^```$/ && blkline > 0 {blkline=0;} | |
| blkline > 0 && skip == 0 {print $0; blkline++; } | |
| $0 ~ /^```shell$/ && blkline == 0 {blkline=1; skip=0;} | |
| ' <<'EXAMPLE_MD' | |
| ## Title |
| # Read dependency information from rpmbuild/SPECS/*.spec. | |
| # % cat rpmbuild/SPECS/*.spec | rpmspec_depends | |
| function rpmspec_depends() { | |
| # 0. remove redhat meta variables. | |
| # 1. convert space list to line list. | |
| # 2. remove trailing spaces. | |
| # 3. remove debian meta variables. i.e. ${shlib:Depends} | |
| # 4. remove version conditions. | |
| # 5. remove wakame-vdc packages. | |
| awk -F: '$1 == "BuildRequires" || $1 == "Requires" { print substr($0, length($1)+2)}' | \ |
RHEL系で新しいマイナーリリースができた時yum updateしてしまうと、システムが大きく更新される。本番環境などではこれを固定したいことがあるので、その方法。
yum.repoファイルへ現れる、$releasever 変数を固定する。
例: CentOS6.4で以降のリリースがある場合でも6.4のまま固定化する。
--releaseverオプションを指定する。| # http://developer.github.com/v3/pulls/#create-a-pull-request | |
| curl -u "unakatsuo:your_oauth_token" https://api.github.com/repos/axsh/wakame-vdc/pulls -d '{"issue": "325", "head":"fix-instance-monitor", "base":"master"}' |
online=0 is the secret key make this happen.
# tgtadm --lld iscsi --op update --mode logicalunit --tid=1 --lun=1 --params 'online=0,path=/mnt/work1/testvol/vol2.img'% rpmbuild -bp --nodeps hoge.spec