add gitr which recursively executes git commands
This commit is contained in:
parent
0a1b93900e
commit
5d0c82a79d
@ -135,8 +135,7 @@ function init_db() {
|
|||||||
dc exec $1 rails db:drop db:create db:migrate db:seed
|
dc exec $1 rails db:drop db:create db:migrate db:seed
|
||||||
}
|
}
|
||||||
function cmd_exists() {
|
function cmd_exists() {
|
||||||
cmd=$1
|
$* &> /dev/null
|
||||||
$cmd &> /dev/null;
|
|
||||||
if [[ $? == 0 ]]; then
|
if [[ $? == 0 ]]; then
|
||||||
echo Y
|
echo Y
|
||||||
else
|
else
|
||||||
@ -181,6 +180,19 @@ function qshell_upload() {
|
|||||||
qshell rput $bucket $key $filepath
|
qshell rput $bucket $key $filepath
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function gitr() {
|
||||||
|
args=$*
|
||||||
|
for dir in `ls`; do
|
||||||
|
if [[ -d "$dir" && -d "$dir/.git" ]]; then
|
||||||
|
pushd .
|
||||||
|
echo "${GREEN}$(basename $dir)${NC}"
|
||||||
|
cd $dir
|
||||||
|
git $args
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
function gitcopy() {
|
function gitcopy() {
|
||||||
n=1
|
n=1
|
||||||
while getopts "c:n:t:T" o; do
|
while getopts "c:n:t:T" o; do
|
||||||
|
Loading…
Reference in New Issue
Block a user