1
0
mirror of https://gitlab.com/JKANetwork/jka-toolkit.git synced 2026-02-19 11:31:31 +01:00

Mejora gitdit

This commit is contained in:
JoseluCross
2016-06-28 15:33:53 +02:00
parent b2c0819ab9
commit bde0e639df

View File

@@ -1,9 +1,10 @@
#!/bin/bash
VERSION="0.1.3"
gitopt=`dialog --stdout --scrollbar --menu "gitdit - Git DIalog inTerface" 0 0 6 p "Descargar actualizaciones del git (Hacer pull)" s "Subir actualizaciones al git (Hacer push)" c "Descargar un nuevo git (Hacer clone)" b "Cambiar de branch/rama (Hacer checkout)" m "Unir ramas (Hacer merge)"`
alias brunch='git branch --list'
actual="origin $(brunch | grep "^*" | cut -f1 -d" ")"
case $gitopt in
"p") git pull;;
"p") git pull $actual;;
"s") commit=`dialog --stdout --inputbox "Cambios (texto commit)" 10 50 "changes"`
if [[ -z $commit ]];then
commit="changes"
@@ -15,9 +16,18 @@ case $gitopt in
git clone $giturl
;;
"b")
gitbranch=`dialog --stdout --inputbox "Nueva rama/branch" 10 60`
git checkout $gitbranch
;;
j=0
rama=""
for i in $(brunch)
do
if [ $i != "*" ]
rama="$rama $j $i"
lista[$j]=$i
let j++
fi
done
ramificacion=`dialog --stdout --scrollbar --menu "Selecione la rama" 0 0 6 $rama`
git checkout ${lista[$ramificacion]}
"m")
until [[ $gitbusing && $gitbmerge ]]
do