mirror of
https://gitlab.com/JKANetwork/jka-toolkit.git
synced 2026-02-15 17:41:31 +01:00
Update gitdit
This commit is contained in:
@@ -1,15 +1,14 @@
|
|||||||
#!/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)"`
|
||||||
brunch=`git branch --list`
|
actual="origin $(git branch --list | grep "^*" | cut -f1 -d" ")"
|
||||||
actual="origin $($brunch | grep "^*" | cut -f1 -d" ")"
|
|
||||||
case $gitopt in
|
case $gitopt in
|
||||||
"p") git pull $actual;;
|
"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"
|
||||||
fi
|
fi
|
||||||
git add . && git commit -m "$commit" && git push
|
git add . && git commit -m "$commit" && git push $actual
|
||||||
;;
|
;;
|
||||||
"c")
|
"c")
|
||||||
giturl=`dialog --stdout --inputbox "URL del git" 10 60`
|
giturl=`dialog --stdout --inputbox "URL del git" 10 60`
|
||||||
@@ -18,7 +17,7 @@ case $gitopt in
|
|||||||
"b")
|
"b")
|
||||||
j=0
|
j=0
|
||||||
rama=""
|
rama=""
|
||||||
for i in $($brunch)
|
for i in $(git branch --list | grep "^*" -v )
|
||||||
do
|
do
|
||||||
if [ $i != "*" ];then
|
if [ $i != "*" ];then
|
||||||
rama="$rama $j $i"
|
rama="$rama $j $i"
|
||||||
@@ -28,6 +27,7 @@ case $gitopt in
|
|||||||
done
|
done
|
||||||
ramificacion=`dialog --stdout --scrollbar --menu "Selecione la rama" 0 0 6 $rama`
|
ramificacion=`dialog --stdout --scrollbar --menu "Selecione la rama" 0 0 6 $rama`
|
||||||
git checkout ${lista[$ramificacion]}
|
git checkout ${lista[$ramificacion]}
|
||||||
|
;;
|
||||||
"m")
|
"m")
|
||||||
until [[ $gitbusing && $gitbmerge ]]
|
until [[ $gitbusing && $gitbmerge ]]
|
||||||
do
|
do
|
||||||
|
|||||||
3
jka-toolkit/pruebas
Normal file
3
jka-toolkit/pruebas
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
* hotfix
|
||||||
|
master
|
||||||
|
pruebas
|
||||||
Reference in New Issue
Block a user