Skip to content

Instantly share code, notes, and snippets.

@AnaTofuZ
Created December 21, 2016 03:20
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save AnaTofuZ/9e6d4dbad3d23237c6f97b92e40a5d05 to your computer and use it in GitHub Desktop.
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