$(init 0)

This commit is contained in:
2022-04-30 20:02:08 +03:00
parent 7d0a476cf4
commit c1159c1b51

10
giteaDo
View File

@@ -4,6 +4,10 @@ GITEA_URL="http://git.konsthol.eu:3333"
USERNAME="konsthol"
#MENU='rofi -theme-str 'window {width: 400px; height: 200px;}' -dmenu -i -p repoToDelete'
MENU="rofi -dmenu -i -p repoToDelete"
[[ "$OSTYPE" != "linux-gnu" ]] && MENU="fzf -i --prompt=repoToDelete"
NAME="${0##*/}"
function usage() {
@@ -85,7 +89,7 @@ else
;;
-i|--instant)
read -p "Enter new repo's description: " description
createRepo "$(basename $PWD)" "$description"
createRepo "$(basename $PWD)" "$description" | jq
git init
git add .
git commit -m "$(curl -s http://whatthecommit.com/index.txt)"
@@ -93,8 +97,8 @@ else
git push -u origin master
;;
-d|--delete)
NAME="$(giteaDo -l | rofi -theme-str 'window {width: 400px; height: 200px;}' -dmenu -i -p 'Repo to delete?')"
deleteRepo "$NAME"
NAME="$(giteaDo -l | $MENU)"
[[ -n $NAME ]] && deleteRepo "$NAME"
;;
-l|--list)
listRepos