AutoYADM commit: 2025-05-02 18:55:13

This commit is contained in:
Daniel Fichtinger 2025-05-02 18:55:13 -04:00
parent 58cb590e87
commit 0715b481e2

View file

@ -1,7 +1,22 @@
function newrepo
function newrepo --description 'Create new repos on multiple providers'
argparse h/help p/private P/public s/srht g/github a/all d/description= -- $argv
function help
echo Help menu
echo newrepo -- easily create sr.ht and github repos!
echo USAGE
echo \tnewrepo '[<name>]' '[flags]'
echo FLAGS
echo \t-p/--private: set private
echo \t-P/--public: set public
echo \t-s/--srht: set srht provider
echo \t-g/--github: set github provider
echo \t-a/--all: set all providers
echo \t-d/--description '[<string>]': set optional description
echo AUTHOR
echo \tDaniel Fichtinger '<daniel@ficd.ca>'
echo LICENSE
echo \tMIT
echo URL
echo \t'git.sr.ht/~ficd/newrepo.fish'
end
if set -lq _flag_h || test (count $argv) -eq 0
help
@ -38,6 +53,13 @@ function newrepo
if set -lq _flag_d
set add --description \"$_flag_d\"
end
echo hut git create $name --visibility $visibility $add
hut git create $name --visibility $visibility $add
end
if set -lq _flag_g || set -lq _flag_a
set -l add
if set -lq _flag_d
set add --description \"$_flag_d\"
end
gh repo create $name --disable-wiki "--$visibility" $add
end
end