Created
December 21, 2016 03:20
Star
You must be signed in to star a gist
osmkdirするとディレクトリとpathを記述したhgrcを作り,mercurialにcloneするzsh関数
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
#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