bash

exportする環境変数をファイル経由で読み込む

環境 Ubuntu 14.04 やりたいこと シェルを実行するときにexportする環境変数を別ファイルにする 別ファイルはシェルで動的に生成する 動的にexport文を作るシェルは割愛出力イメージ send.txt export HOGE_PATH='send_path' export HOGE_NAME='send_name'受…

kcovでbashシェルスクリプトのカバレッジを計測する

http://simonkagstrom.github.io/kcov/環境 Centos6.2 インストール # yum install cmake $ mkdir kcov $ cd kcov $ wget https://github.com/SimonKagstrom/kcov/archive/v26.tar.gz $ tar xvzf v26.tar.gz $ cd kcov-26 $ cd kcov-26 $ mkdir build $ cd b…

shunit2でテストコードを書いてみる

Google Code Archive - Long-term storage for Google Code Project Hosting.インストール $ mkdir shunit2 $ wget https://shunit2.googlecode.com/files/shunit2-2.1.6.tgz $ tar zxvf shunit2-2.1.6.tgzディレクトリ ./shunit2/shunit2-2.1.6テストファイ…