mirror of
https://gitlab.com/JKANetwork/jka-toolkit.git
synced 2026-02-24 14:03:50 +01:00
Mejora gitdit
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
VERSION="0.1.3"
|
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)"`
|
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
|
case $gitopt in
|
||||||
"p") git pull;;
|
"p") git pull $actual;;
|
||||||
"s") commit=`dialog --stdout --inputbox "Cambios (texto commit)" 10 50 "changes"`
|
"s") commit=`dialog --stdout --inputbox "Cambios (texto commit)" 10 50 "changes"`
|
||||||
if [[ -z $commit ]];then
|
if [[ -z $commit ]];then
|
||||||
commit="changes"
|
commit="changes"
|
||||||
@@ -15,9 +16,18 @@ case $gitopt in
|
|||||||
git clone $giturl
|
git clone $giturl
|
||||||
;;
|
;;
|
||||||
"b")
|
"b")
|
||||||
gitbranch=`dialog --stdout --inputbox "Nueva rama/branch" 10 60`
|
j=0
|
||||||
git checkout $gitbranch
|
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")
|
"m")
|
||||||
until [[ $gitbusing && $gitbmerge ]]
|
until [[ $gitbusing && $gitbmerge ]]
|
||||||
do
|
do
|
||||||
|
|||||||
Reference in New Issue
Block a user