AutoYADM commit: 2025-05-02 18:55:13
This commit is contained in:
parent
58cb590e87
commit
0715b481e2
1 changed files with 25 additions and 3 deletions
|
@ -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
|
argparse h/help p/private P/public s/srht g/github a/all d/description= -- $argv
|
||||||
function help
|
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
|
end
|
||||||
if set -lq _flag_h || test (count $argv) -eq 0
|
if set -lq _flag_h || test (count $argv) -eq 0
|
||||||
help
|
help
|
||||||
|
@ -38,6 +53,13 @@ function newrepo
|
||||||
if set -lq _flag_d
|
if set -lq _flag_d
|
||||||
set add --description \"$_flag_d\"
|
set add --description \"$_flag_d\"
|
||||||
end
|
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
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue