Created
December 21, 2016 03:20
-
-
Save AnaTofuZ/9e6d4dbad3d23237c6f97b92e40a5d05 to your computer and use it in GitHub Desktop.
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