mirror of
https://gitlab.com/JKANetwork/jka-toolkit.git
synced 2026-03-05 01:52:03 +01:00
32 lines
1.0 KiB
Bash
Executable File
32 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
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 "changes"`
|
|
if [[ -z $commit ]];then
|
|
commit="changes"
|
|
fi
|
|
git add . && git commit -m "$commit" && git push
|
|
;;
|
|
"c")
|
|
giturl=`dialog --stdout --inputbox "URL del git" 10 60`
|
|
git clone $giturl
|
|
;;
|
|
"b")
|
|
gitbranch=`dialog --stdout --inputbox "Nueva rama/branch" 10 60`
|
|
git checkout $gitbranch
|
|
;;
|
|
"m")
|
|
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 "master"`
|
|
done
|
|
git checkout $gitbmerge
|
|
git merge $gitbusing
|
|
git push
|
|
;;
|
|
esac
|