Created
April 27, 2012 11:34
-
-
Save nicklegr/2508548 to your computer and use it in GitHub Desktop.
GCJ bash aliases
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
function sakura { | |
cygstart /d/Program\ Files/sakura/sakura.exe `cygpath -m $@` | |
} | |
# 問題とサンプルデータを生成し、開く。 | |
# usage: go A | |
function go() { | |
problem=$1 | |
source=$problem.rb | |
data=$problem-sample.in | |
if [ ! -e $source ]; then | |
cp tmpl.rb $source | |
fi | |
if [ ! -e $data ]; then | |
touch $data | |
fi | |
sakura $source | |
sakura $data | |
} | |
# デバッグ実行 | |
# usage: debug A <input_data_file> | |
function debug() { | |
problem=$1 | |
in=$2 | |
source=$problem.rb | |
ruby -d $source < $in | |
} | |
# サンプルデータで動作テスト | |
# usage: sample A | |
function sample() { | |
problem=$1 | |
source=$problem.rb | |
in=$problem-sample.in | |
out=$problem-sample.out | |
ruby $source < $in | |
} | |
# Smallを実行 | |
# usage: small A 0 | |
function small() { | |
problem=$1 | |
attempt=$2 | |
source=$problem.rb | |
in=$problem-small-attempt$attempt.in | |
out=$problem-small-attempt$attempt.out | |
ruby $source < $in > $out | |
sakura $out | |
} | |
# Largeを実行 | |
# usage: large A | |
function large() { | |
problem=$1 | |
source=$problem.rb | |
in=$problem-large.in | |
out=$problem-large.out | |
ruby $source < $in > $out | |
sakura $out | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment