gcn demo
This commit is contained in:
parent
543e3e2f22
commit
b750c37e3b
@ -181,13 +181,12 @@ function qshell_upload() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function gitr() {
|
function gitr() {
|
||||||
args=$*
|
|
||||||
for dir in `ls`; do
|
for dir in `ls`; do
|
||||||
if [[ -d "$dir" && -d "$dir/.git" ]]; then
|
if [[ -d "$dir" && -d "$dir/.git" ]]; then
|
||||||
pushd .
|
pushd .
|
||||||
echo "${GREEN}$(basename $dir)${NC}"
|
echo "${GREEN}$(basename $dir)${NC}"
|
||||||
cd $dir
|
cd $dir
|
||||||
git $args
|
git $*
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -355,3 +354,29 @@ function dc {
|
|||||||
function get_ip_of_ssh_hostname {
|
function get_ip_of_ssh_hostname {
|
||||||
ssh -G $1 | awk '/^hostname / { print $2 }'
|
ssh -G $1 | awk '/^hostname / { print $2 }'
|
||||||
}
|
}
|
||||||
|
function gcn {
|
||||||
|
while true;do
|
||||||
|
typeset -A users
|
||||||
|
users=('1' 'hophacker' '2' 'zhcalvin' '6' 'wsq')
|
||||||
|
for k in "${(@k)users}"; do
|
||||||
|
echo "$k || $users[$k]"
|
||||||
|
done
|
||||||
|
read input
|
||||||
|
if [[ ! -z $users[$input] ]];then
|
||||||
|
name=$users[$input]
|
||||||
|
break
|
||||||
|
else
|
||||||
|
for k in "${(@k)users}"; do
|
||||||
|
if [[ $input == $users[$k] ]];then
|
||||||
|
name=$input
|
||||||
|
break 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo 'invalid option...'
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
typeset -A emails
|
||||||
|
emails=('hophacker' 'j' 'zhcalvin' 'c' 'wsq' 'wsq')
|
||||||
|
set -x
|
||||||
|
git commit --amend --author="$name<$emails[$name]@paiyou.co>" $*
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user