Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
osmkdirするとディレクトリとpathを記述したhgrcを作り,mercurialにcloneするzsh関数
#OSmkdir{{{
osmkdir()
{
if [ $# -eq 0 ]; then
echo "missing arguments " 1>&2
exit 1
fi
#ここのSSHを変更してください
SSH=ssh://yomitan//home/hg/y15/e155730/OS/
mkdir $1 &&hg init $1
cat << EOF >$1/.hg/hgrc
[paths]
default = $SSH$1
[ui]
EOF
hg clone $1 $SSH$1
}
#}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment