From 96a485adb6442f5f40f93244506a7543456b086a Mon Sep 17 00:00:00 2001 From: kprkpr Date: Sat, 18 Jun 2016 23:10:00 +0200 Subject: [PATCH 01/20] changes --- jka-toolkit/gitdit | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jka-toolkit/gitdit b/jka-toolkit/gitdit index 001b0e3..63e87eb 100755 --- a/jka-toolkit/gitdit +++ b/jka-toolkit/gitdit @@ -1,10 +1,10 @@ #!/bin/bash -VERSION="0.1.1" +VERSION="0.1.2" 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)"` case $gitopt in "p") git pull;; - "s") commit=`dialog --stdout --inputbox "Cambios (texto commit)" 10 50` + "s") commit=`dialog --stdout --inputbox "Cambios (texto commit)" 10 50 "changes"` if [[ -z $commit ]];then commit="changes" fi @@ -22,10 +22,10 @@ case $gitopt in until [[ $gitbusing && $gitbmerge ]] do gitbusing=`dialog --stdout --inputbox "Rama actual" 10 60` - gitbmerge=`dialog --stdout --inputbox "Rama con la que unir (la final,normalmente master)" 10 60` + gitbmerge=`dialog --stdout --inputbox "Rama con la que unir (la final,normalmente master)" 10 60 "master"` done git checkout $gitbmerge git merge $gitbusing git push ;; -esac \ No newline at end of file +esac From 782b200c606cfe0cbae174a0cd72f1f766b07168 Mon Sep 17 00:00:00 2001 From: JKANetwork Date: Sat, 18 Jun 2016 21:18:15 +0000 Subject: [PATCH 02/20] Update gitdit. Prueba del git status --- jka-toolkit/gitdit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jka-toolkit/gitdit b/jka-toolkit/gitdit index 63e87eb..c233dec 100755 --- a/jka-toolkit/gitdit +++ b/jka-toolkit/gitdit @@ -1,5 +1,5 @@ #!/bin/bash -VERSION="0.1.2" +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)"` case $gitopt in From a8fff3bfd6a4ede92cf95d9ed8f4ad647cbd0153 Mon Sep 17 00:00:00 2001 From: JKANetwork Date: Sat, 18 Jun 2016 21:21:32 +0000 Subject: [PATCH 03/20] Prueba del git status 2/2 --- jka-toolkit/gitdit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jka-toolkit/gitdit b/jka-toolkit/gitdit index c233dec..63e87eb 100755 --- a/jka-toolkit/gitdit +++ b/jka-toolkit/gitdit @@ -1,5 +1,5 @@ #!/bin/bash -VERSION="0.1.3" +VERSION="0.1.2" 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)"` case $gitopt in From 843caa34552e0bab0dc661ef6e1d1ed9d14788f7 Mon Sep 17 00:00:00 2001 From: JKANetwork Date: Sat, 18 Jun 2016 21:25:44 +0000 Subject: [PATCH 04/20] Pruebas del git staus 3/3 --- jka-toolkit/gitdit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jka-toolkit/gitdit b/jka-toolkit/gitdit index 63e87eb..c233dec 100755 --- a/jka-toolkit/gitdit +++ b/jka-toolkit/gitdit @@ -1,5 +1,5 @@ #!/bin/bash -VERSION="0.1.2" +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)"` case $gitopt in From 27a00c0a9ed9ca7ca42f56679832568d0b822a51 Mon Sep 17 00:00:00 2001 From: JKANetwork Date: Sat, 18 Jun 2016 21:31:48 +0000 Subject: [PATCH 05/20] 4/4 --- jka-toolkit/gitdit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jka-toolkit/gitdit b/jka-toolkit/gitdit index c233dec..63e87eb 100755 --- a/jka-toolkit/gitdit +++ b/jka-toolkit/gitdit @@ -1,5 +1,5 @@ #!/bin/bash -VERSION="0.1.3" +VERSION="0.1.2" 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)"` case $gitopt in From 55e59679c57a212dc5ca22261151cc091de0606a Mon Sep 17 00:00:00 2001 From: kprkpr Date: Sat, 18 Jun 2016 23:50:39 +0200 Subject: [PATCH 06/20] changes --- jka-toolkit/gitdit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jka-toolkit/gitdit b/jka-toolkit/gitdit index 63e87eb..c233dec 100755 --- a/jka-toolkit/gitdit +++ b/jka-toolkit/gitdit @@ -1,5 +1,5 @@ #!/bin/bash -VERSION="0.1.2" +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)"` case $gitopt in From f86124cf50eeab77d4bacb3a4f6fd1eaf56c59e3 Mon Sep 17 00:00:00 2001 From: JoseluCross Date: Wed, 22 Jun 2016 16:51:32 +0200 Subject: [PATCH 07/20] Update --- jka-toolkit/jkazip | 104 +++++++++++++++++++++++---------------------- 1 file changed, 53 insertions(+), 51 deletions(-) diff --git a/jka-toolkit/jkazip b/jka-toolkit/jkazip index 10f3dbe..687afe7 100755 --- a/jka-toolkit/jkazip +++ b/jka-toolkit/jkazip @@ -41,9 +41,9 @@ function msg2() { } version="2.0.2" -if [ -z $1 ];then +if [ -z "$1" ];then echo "$(gettext "No option specified, use jkazip -h")" > /dev/stderr -elif [ $1 = "-h" ];then +elif [ "$1" = "-h" ];then echo "$(gettext " synopsis: jkazip ")" echo "" echo "$(gettext " -d, decompress file")" @@ -59,14 +59,14 @@ elif [ $1 = "-h" ];then echo "" echo "$(gettext " Supported formats: tar, gzip, bzip2, xzip, lzip, 7z, rar (only unzip) and zip")" echo "" -elif [ $1 = "-v" ];then +elif [ "$1" = "-v" ];then printf -- "$(gettext "jkazip by JKA Network; version %s")" "$version" echo -elif [ $1 = "-d" ];then - if [ -z $2 ];then +elif [ "$1" = "-d" ];then + if [ -z "$2" ];then echo "$(gettext "No file or directory specified")" > /dev/stderr exit - elif [ -f $2 ];then + elif [ -f "$2" ];then printf -- "$(gettext "File %s will be decompressed")" "$2" echo else @@ -74,37 +74,37 @@ elif [ $1 = "-d" ];then echo exit fi - entrada=$2 - sacaFormato $entrada + entrada="$2" + sacaFormato "$entrada" case $formato in "tar" | "tar.xz" | "tar.lz" | "tar.gz" | "tar.bz2" | "tgz" | "tbz" | "txz" | "tlz") - tar xvf $entrada - msg2 $entrada + tar xvf "$entrada" + msg2 "$entrada" ;; "7z") - 7z x $entrada - msg2 $entrada + 7z x "$entrada" + msg2 "$entrada" ;; "zip") - unzip $entrada - msg2 $entrada + unzip "$entrada" + msg2 "$entrada" ;; "gz" | "lz") formato="${formato}ip" - $formato -dk $entrada - msg2 $entrada + $formato -dk "$entrada" + msg2 "$entrada" ;; "xz") - $formato -dk $entrada - msg2 $entrada + $formato -dk "$entrada" + msg2 "$entrada" ;; "bz2") - bzip2 -dk $entrada - msg2 $entrada + bzip2 -dk "$entrada" + msg2 "$entrada" ;; "rar") - unrar x $entrada - msg2 $entrada + unrar x "$entrada" + msg2 "$entrada" ;; *) printf -- "$(gettext "File extension %s are not supported")" $formato > /dev/stderr @@ -112,54 +112,56 @@ elif [ $1 = "-d" ];then ;; esac -elif [ $1 = "-c" ];then - salida=$2 - if [ -z $3 ];then +elif [ "$1" = "-c" ];then + salida="$2" + if [ -z "$3" ];then echo "$(gettext "No file or directory specified")" - exit - else - for i in $@ - do - if [[ $i != $1 && $i != $2 ]];then - if [ ! -d $i -a ! -f $i ];then - printf -- "$(gettext "%s no such file or directory")" "$i" - echo - exit - fi - fi - done + exit fi - files=$3 +# TODO: Hacer que esto funcione +# else +# for i in $@ +# do +# if [[ "$i" != "$1" && "$i" != "$2" ]];then +# if [ ! -d "$i" -a ! -f "$i" ];then +# printf -- "$(gettext "%s no such file or directory")" "$i" +# echo +# exit +# fi +# fi +# done +# fi + files="$3" for (( i=4; i<=$#; i++)) do files="$files $(echo $* | cut -f$i -d" ")" done - sacaFormato $salida + sacaFormato "$salida" case $formato in "tar" | "tar.xz" | "tar.lz" | "tar.gz" | "tar.bz2" | "tgz" | "tbz" | "txz" | "tlz") - tar cvfa $salida $files - msg $files $salida + tar cvfa "$salida" "$files" + msg "$files" "$salida" ;; "7z") - 7z a $salida $files - msg $files $salida + 7z a "$salida" "$files" + msg "$files" "$salida" ;; "zip") - zip $salida $files - msg $files $salida + zip "$salida" "$files" + msg "$files" "$salida" ;; "gz" | "lz") formato="${formato}ip" - $formato -9kc $3 > $salida - msg $3 $salida + "$formato" -9kc "$3" > "$salida" + msg "$3" "$salida" ;; "xz") - $formato -9kc $3 > $salida - msg $3 $salida + "$formato" -9kc "$3" > "$salida" + msg "$3" "$salida" ;; "bz2") - $formato -9kc $3 > $salida - msg $3 $salida + "$formato" -9kc "$3" > "$salida" + msg "$3" "$salida" ;; "rar") echo "$(gettext "rar compression are not supported")" > /dev/stderr From ed65ffce37255a7cc8d4f3641ec0975f5986dfd3 Mon Sep 17 00:00:00 2001 From: kprkpr Date: Wed, 22 Jun 2016 23:24:23 +0200 Subject: [PATCH 08/20] pruebas del todo... --- jka-toolkit/jkazip | 51 ++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/jka-toolkit/jkazip b/jka-toolkit/jkazip index 687afe7..5365e44 100755 --- a/jka-toolkit/jkazip +++ b/jka-toolkit/jkazip @@ -28,15 +28,15 @@ function sacaFormato() { } #Function msg, print in stdout a final message function msg() { - local var=$1 - local var2=$2 - printf -- "$(gettext "File/s %s has/have been compressed in %s")" $var $var2 + local var="$1" + local var2="$2" + printf -- "$(gettext "File/s %s has/have been compressed in %s")" "$var" "$var2" echo } #Function msg2, print in stdout a final message function msg2() { - local var=$1 - printf -- "$(gettext "File %s has been decompressed")" $var + local var="$1" + printf -- "$(gettext "File %s has been decompressed")" "$var" echo } @@ -119,23 +119,30 @@ elif [ "$1" = "-c" ];then exit fi # TODO: Hacer que esto funcione -# else -# for i in $@ -# do -# if [[ "$i" != "$1" && "$i" != "$2" ]];then -# if [ ! -d "$i" -a ! -f "$i" ];then -# printf -- "$(gettext "%s no such file or directory")" "$i" -# echo -# exit -# fi -# fi -# done -# fi - files="$3" - for (( i=4; i<=$#; i++)) - do - files="$files $(echo $* | cut -f$i -d" ")" - done +### Funcion nueva + for compfile in "$@"; do + if [[ "$compfile" != "$1" && "$compfile" != "$2" ]];then + if [ ! -d "$compfile" -a ! -f "$compfile" ];then + printf -- "$(gettext "%s no such file or directory")" "$compfile" + echo + #exit + fi + fi + done +### Fin funcion nueva del tod +#Funcion files nueva + for compfile in "$@"; do + if [[ "$compfile" != "$1" && "$compfile" != "$2" ]];then + files="$files $compfile" + fi + done +#Fin funcion files nueva +## files anterior +# files="$3" +# for (( i=4; i<=$#; i++)) +# do +# files="$files $(echo $* | cut -f$i -d" ")" +# done sacaFormato "$salida" case $formato in "tar" | "tar.xz" | "tar.lz" | "tar.gz" | "tar.bz2" | "tgz" | "tbz" | "txz" | "tlz") From 665de7b4aee2e2e0f3d09fbb514165290375949b Mon Sep 17 00:00:00 2001 From: kprkpr Date: Wed, 22 Jun 2016 23:35:53 +0200 Subject: [PATCH 09/20] prueba 2 de las funciones nuevas --- jka-toolkit/jkazip | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jka-toolkit/jkazip b/jka-toolkit/jkazip index 5365e44..3e2a1cc 100755 --- a/jka-toolkit/jkazip +++ b/jka-toolkit/jkazip @@ -146,15 +146,15 @@ elif [ "$1" = "-c" ];then sacaFormato "$salida" case $formato in "tar" | "tar.xz" | "tar.lz" | "tar.gz" | "tar.bz2" | "tgz" | "tbz" | "txz" | "tlz") - tar cvfa "$salida" "$files" + tar cvfa "$salida" $files msg "$files" "$salida" ;; "7z") - 7z a "$salida" "$files" + 7z a "$salida" $files msg "$files" "$salida" ;; "zip") - zip "$salida" "$files" + zip "$salida" $files msg "$files" "$salida" ;; "gz" | "lz") From ff5c3df46488be9db89a0d94d0d2676fc1e2b66a Mon Sep 17 00:00:00 2001 From: JoseluCross Date: Tue, 28 Jun 2016 11:55:51 +0200 Subject: [PATCH 10/20] Arregla JKAZIP --- jka-toolkit/jkazip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jka-toolkit/jkazip b/jka-toolkit/jkazip index 3e2a1cc..ddff2bc 100755 --- a/jka-toolkit/jkazip +++ b/jka-toolkit/jkazip @@ -145,7 +145,7 @@ elif [ "$1" = "-c" ];then # done sacaFormato "$salida" case $formato in - "tar" | "tar.xz" | "tar.lz" | "tar.gz" | "tar.bz2" | "tgz" | "tbz" | "txz" | "tlz") + "tar" | "tar.xz" | "tar.lz" | "tar.gz" | "tar.bz2" | "tgz" | "tbz2" | "txz" | "tlz") tar cvfa "$salida" $files msg "$files" "$salida" ;; From b2c0819ab9b35d3676b745b0c1c234a341b9ce05 Mon Sep 17 00:00:00 2001 From: JoseluCross Date: Tue, 28 Jun 2016 15:08:21 +0200 Subject: [PATCH 11/20] Update tbz2 --- jka-toolkit/jkazip | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jka-toolkit/jkazip b/jka-toolkit/jkazip index ddff2bc..92b5a23 100755 --- a/jka-toolkit/jkazip +++ b/jka-toolkit/jkazip @@ -40,7 +40,7 @@ function msg2() { echo } -version="2.0.2" +version="2.0.3" if [ -z "$1" ];then echo "$(gettext "No option specified, use jkazip -h")" > /dev/stderr elif [ "$1" = "-h" ];then @@ -77,7 +77,7 @@ elif [ "$1" = "-d" ];then entrada="$2" sacaFormato "$entrada" case $formato in - "tar" | "tar.xz" | "tar.lz" | "tar.gz" | "tar.bz2" | "tgz" | "tbz" | "txz" | "tlz") + "tar" | "tar.xz" | "tar.lz" | "tar.gz" | "tar.bz2" | "tgz" | "tbz2" | "txz" | "tlz") tar xvf "$entrada" msg2 "$entrada" ;; From bde0e639df905a1853319325af0d75d74cd6bf4d Mon Sep 17 00:00:00 2001 From: JoseluCross Date: Tue, 28 Jun 2016 15:33:53 +0200 Subject: [PATCH 12/20] Mejora gitdit --- jka-toolkit/gitdit | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/jka-toolkit/gitdit b/jka-toolkit/gitdit index c233dec..0e895c5 100755 --- a/jka-toolkit/gitdit +++ b/jka-toolkit/gitdit @@ -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 From d3f0e252fc934f86db539563117a65b0112f5794 Mon Sep 17 00:00:00 2001 From: JoseluCross Date: Tue, 28 Jun 2016 15:52:18 +0200 Subject: [PATCH 13/20] Update gitdit --- jka-toolkit/gitdit | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jka-toolkit/gitdit b/jka-toolkit/gitdit index 0e895c5..9cfdf2c 100755 --- a/jka-toolkit/gitdit +++ b/jka-toolkit/gitdit @@ -1,8 +1,8 @@ #!/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" ")" +brunch=`git branch --list` +actual="origin $($brunch | grep "^*" | cut -f1 -d" ")" case $gitopt in "p") git pull $actual;; "s") commit=`dialog --stdout --inputbox "Cambios (texto commit)" 10 50 "changes"` @@ -18,9 +18,9 @@ case $gitopt in "b") j=0 rama="" - for i in $(brunch) + for i in $($brunch) do - if [ $i != "*" ] + if [ $i != "*" ];then rama="$rama $j $i" lista[$j]=$i let j++ From f68e6024a8abd07a1fcf01a861c5d5d77806220f Mon Sep 17 00:00:00 2001 From: JoseluCross Date: Tue, 28 Jun 2016 16:05:01 +0200 Subject: [PATCH 14/20] Update gitdit --- jka-toolkit/gitdit | 8 ++++---- jka-toolkit/pruebas | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 jka-toolkit/pruebas diff --git a/jka-toolkit/gitdit b/jka-toolkit/gitdit index 9cfdf2c..fce9a71 100755 --- a/jka-toolkit/gitdit +++ b/jka-toolkit/gitdit @@ -1,15 +1,14 @@ #!/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)"` -brunch=`git branch --list` -actual="origin $($brunch | grep "^*" | cut -f1 -d" ")" +actual="origin $(git branch --list | grep "^*" | cut -f1 -d" ")" case $gitopt in "p") git pull $actual;; "s") commit=`dialog --stdout --inputbox "Cambios (texto commit)" 10 50 "changes"` if [[ -z $commit ]];then commit="changes" fi - git add . && git commit -m "$commit" && git push + git add . && git commit -m "$commit" && git push $actual ;; "c") giturl=`dialog --stdout --inputbox "URL del git" 10 60` @@ -18,7 +17,7 @@ case $gitopt in "b") j=0 rama="" - for i in $($brunch) + for i in $(git branch --list | grep "^*" -v ) do if [ $i != "*" ];then rama="$rama $j $i" @@ -28,6 +27,7 @@ case $gitopt in done ramificacion=`dialog --stdout --scrollbar --menu "Selecione la rama" 0 0 6 $rama` git checkout ${lista[$ramificacion]} + ;; "m") until [[ $gitbusing && $gitbmerge ]] do diff --git a/jka-toolkit/pruebas b/jka-toolkit/pruebas new file mode 100644 index 0000000..8b63174 --- /dev/null +++ b/jka-toolkit/pruebas @@ -0,0 +1,3 @@ +* hotfix + master + pruebas From 178873b121e98fc1ab3e7a85cb2a1f7cc22a85b0 Mon Sep 17 00:00:00 2001 From: JoseluCross Date: Tue, 28 Jun 2016 16:34:38 +0200 Subject: [PATCH 15/20] Update gitdit --- jka-toolkit/gitdit | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/jka-toolkit/gitdit b/jka-toolkit/gitdit index fce9a71..3563542 100755 --- a/jka-toolkit/gitdit +++ b/jka-toolkit/gitdit @@ -1,6 +1,6 @@ #!/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)"` +gitopt=`dialog --stdout --scrollbar --menu "gitdit - Git DIalog inTerface" 0 0 6 p "Descargar actualizaciones del git (Hacer pull)" t "Confirmar cambios sin subida" s "Subir actualizaciones al git (Hacer push)" c "Descargar un nuevo git (Hacer clone)" n "Crear nueva rama" b "Cambiar de branch/rama (Hacer checkout)" m "Unir ramas (Hacer merge)"` actual="origin $(git branch --list | grep "^*" | cut -f1 -d" ")" case $gitopt in "p") git pull $actual;; @@ -14,6 +14,13 @@ case $gitopt in giturl=`dialog --stdout --inputbox "URL del git" 10 60` git clone $giturl ;; + "t") + commit=`dialog --stdout --inputbox "Cambios (texto commit)" 10 50 "changes"` + if [[ -z $commit ]];then + commit="changes" + fi + git add . && git commit -m "$commit" + ;; "b") j=0 rama="" @@ -25,17 +32,32 @@ case $gitopt in let j++ fi done - ramificacion=`dialog --stdout --scrollbar --menu "Selecione la rama" 0 0 6 $rama` - git checkout ${lista[$ramificacion]} + ramificacion=`dialog --stdout --scrollbar --menu "Selecione la rama a saltar" 0 0 6 $rama` + if [ ! -z $ramificacion ];then + git checkout ${lista[$ramificacion]} + fi + ;; + "n") + NewBranch=`dialog --stdout --inputbox "Nombre de la nueva rama" 10 50 "new branch"` + if [ ! -z $NewBranch ];then + git checkout -b $NewBranch + fi ;; "m") - until [[ $gitbusing && $gitbmerge ]] + j=0 + rama="" + for i in $(git branch --list | grep "^*" -v ) do - gitbusing=`dialog --stdout --inputbox "Rama actual" 10 60` - gitbmerge=`dialog --stdout --inputbox "Rama con la que unir (la final,normalmente master)" 10 60 "master"` + if [ $i != "*" ];then + rama="$rama $j $i" + lista[$j]=$i + let j++ + fi done - git checkout $gitbmerge - git merge $gitbusing - git push + merges=`dialog --stdout --scrollbar --menu "Selecione la rama a unir" 0 0 6 $rama` + if [ ! -z $merges ];then + git merge ${lista[$merges]} + git push + fi ;; esac From a57b96b4b9045dd0976c61fc4262a5c2213cd960 Mon Sep 17 00:00:00 2001 From: JoseluCross Date: Tue, 28 Jun 2016 16:36:28 +0200 Subject: [PATCH 16/20] Update gitdit --- jka-toolkit/gitdit | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jka-toolkit/gitdit b/jka-toolkit/gitdit index 3563542..b3c7aa5 100755 --- a/jka-toolkit/gitdit +++ b/jka-toolkit/gitdit @@ -1,14 +1,13 @@ #!/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)" t "Confirmar cambios sin subida" s "Subir actualizaciones al git (Hacer push)" c "Descargar un nuevo git (Hacer clone)" n "Crear nueva rama" b "Cambiar de branch/rama (Hacer checkout)" m "Unir ramas (Hacer merge)"` -actual="origin $(git branch --list | grep "^*" | cut -f1 -d" ")" case $gitopt in - "p") git pull $actual;; + "p") git pull origin $(git branch --list | grep "^*" | cut -f1 -d" ");; "s") commit=`dialog --stdout --inputbox "Cambios (texto commit)" 10 50 "changes"` if [[ -z $commit ]];then commit="changes" fi - git add . && git commit -m "$commit" && git push $actual + git add . && git commit -m "$commit" && git push origin $(git branch --list | grep "^*" | cut -f1 -d" ") ;; "c") giturl=`dialog --stdout --inputbox "URL del git" 10 60` From 4e2b08f7c9a5e6eb8d059271696ea440cf819e13 Mon Sep 17 00:00:00 2001 From: JoseluCross Date: Tue, 28 Jun 2016 16:38:17 +0200 Subject: [PATCH 17/20] Update --- jka-toolkit/gitdit | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jka-toolkit/gitdit b/jka-toolkit/gitdit index b3c7aa5..9cd78de 100755 --- a/jka-toolkit/gitdit +++ b/jka-toolkit/gitdit @@ -1,13 +1,15 @@ #!/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)" t "Confirmar cambios sin subida" s "Subir actualizaciones al git (Hacer push)" c "Descargar un nuevo git (Hacer clone)" n "Crear nueva rama" b "Cambiar de branch/rama (Hacer checkout)" m "Unir ramas (Hacer merge)"` +actual="origin $(git branch --list | grep "^*" | cut -f1 -d" ")" +echo "$actual" case $gitopt in - "p") git pull origin $(git branch --list | grep "^*" | cut -f1 -d" ");; + "p") git pull $actual;; "s") commit=`dialog --stdout --inputbox "Cambios (texto commit)" 10 50 "changes"` if [[ -z $commit ]];then commit="changes" fi - git add . && git commit -m "$commit" && git push origin $(git branch --list | grep "^*" | cut -f1 -d" ") + git add . && git commit -m "$commit" && git push $actual ;; "c") giturl=`dialog --stdout --inputbox "URL del git" 10 60` From 2c2bba9858937bbf8b674600d15e40a278169244 Mon Sep 17 00:00:00 2001 From: JoseluCross Date: Tue, 28 Jun 2016 16:39:23 +0200 Subject: [PATCH 18/20] Update, ahora si que si --- jka-toolkit/gitdit | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jka-toolkit/gitdit b/jka-toolkit/gitdit index 9cd78de..0e46204 100755 --- a/jka-toolkit/gitdit +++ b/jka-toolkit/gitdit @@ -1,8 +1,7 @@ #!/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)" t "Confirmar cambios sin subida" s "Subir actualizaciones al git (Hacer push)" c "Descargar un nuevo git (Hacer clone)" n "Crear nueva rama" b "Cambiar de branch/rama (Hacer checkout)" m "Unir ramas (Hacer merge)"` -actual="origin $(git branch --list | grep "^*" | cut -f1 -d" ")" -echo "$actual" +actual="origin $(git branch --list | grep "^*" | cut -f2 -d" ")" case $gitopt in "p") git pull $actual;; "s") commit=`dialog --stdout --inputbox "Cambios (texto commit)" 10 50 "changes"` From 3d74332d82cae693d673b49fc5bbd0e465b00071 Mon Sep 17 00:00:00 2001 From: JoseluCross Date: Tue, 28 Jun 2016 16:40:07 +0200 Subject: [PATCH 19/20] Update 0.2.0 --- jka-toolkit/gitdit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jka-toolkit/gitdit b/jka-toolkit/gitdit index 0e46204..2d91bdc 100755 --- a/jka-toolkit/gitdit +++ b/jka-toolkit/gitdit @@ -1,5 +1,5 @@ #!/bin/bash -VERSION="0.1.3" +VERSION="0.2.0" gitopt=`dialog --stdout --scrollbar --menu "gitdit - Git DIalog inTerface" 0 0 6 p "Descargar actualizaciones del git (Hacer pull)" t "Confirmar cambios sin subida" s "Subir actualizaciones al git (Hacer push)" c "Descargar un nuevo git (Hacer clone)" n "Crear nueva rama" b "Cambiar de branch/rama (Hacer checkout)" m "Unir ramas (Hacer merge)"` actual="origin $(git branch --list | grep "^*" | cut -f2 -d" ")" case $gitopt in From ec93689e16da14940a2fb818f66f17e74d43332e Mon Sep 17 00:00:00 2001 From: JKANetwork Date: Tue, 28 Jun 2016 20:09:23 +0200 Subject: [PATCH 20/20] gitdit final update --- jka-toolkit/gitdit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jka-toolkit/gitdit b/jka-toolkit/gitdit index 2d91bdc..67b0bcb 100755 --- a/jka-toolkit/gitdit +++ b/jka-toolkit/gitdit @@ -1,6 +1,6 @@ #!/bin/bash VERSION="0.2.0" -gitopt=`dialog --stdout --scrollbar --menu "gitdit - Git DIalog inTerface" 0 0 6 p "Descargar actualizaciones del git (Hacer pull)" t "Confirmar cambios sin subida" s "Subir actualizaciones al git (Hacer push)" c "Descargar un nuevo git (Hacer clone)" n "Crear nueva rama" 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)" t "Confirmar cambios sin subida" s "Subir actualizaciones al git (Hacer push)" c "Descargar un nuevo git (Hacer clone)" n "Crear nueva rama" b "Cambiar de branch/rama (Hacer checkout)" m "Unir ramas (Hacer merge a la rama actual)"` actual="origin $(git branch --list | grep "^*" | cut -f2 -d" ")" case $gitopt in "p") git pull $actual;; @@ -54,7 +54,7 @@ case $gitopt in let j++ fi done - merges=`dialog --stdout --scrollbar --menu "Selecione la rama a unir" 0 0 6 $rama` + merges=`dialog --stdout --scrollbar --menu "Selecione la rama a unir a $(git branch --list | grep "^*" | cut -f2 -d" ")" 0 0 6 $rama` if [ ! -z $merges ];then git merge ${lista[$merges]} git push