tidy up parameter descriptions and add example
This commit is contained in:
parent
61f97c908e
commit
277035cf55
21
README.md
21
README.md
@ -37,16 +37,16 @@ optional parameters, can appear in any order
|
||||
## git-migrate-repo.sh
|
||||
create mirror or copy of src.koozali.org repository in a local GITEA instance
|
||||
|
||||
git-migrate-repo.sh <repository> <organisation> [<copy|mirror> <target organisation> <debug>]
|
||||
git-migrate-repo.sh <repository> <organisation> [<target organisation> <copy|mirror> <local> <debug>]
|
||||
|
||||
* \<repository\> repository (package) to be copied (e.g. smeserver-yum)
|
||||
* \<organisation\> can be any organisation or user on the remote GITEA instance
|
||||
* \<debug\> run in debug mode
|
||||
|
||||
optional parameters, can appear in any order
|
||||
|
||||
* \<copy|mirror\> will create local repo as either a copy or a mirror of the remote repo (default = copy)
|
||||
* \<target organisation\> within your local GITEA, otherwise local user - must exist already
|
||||
* \<copy|mirror\> will create local repo as either a copy or a mirror of the remote repo (default = copy)
|
||||
* \<local\> use local GITEA as source (i.e. copy between organisations on local GITEA)
|
||||
* \<debug\> run in debug mode
|
||||
|
||||
## git-migrate-org.sh
|
||||
@ -83,7 +83,7 @@ This works whether the repo and local files exist of not (it deletes them if nec
|
||||
## parse-list.sh
|
||||
Parse a list of parameters and execute script with those parameters
|
||||
|
||||
parse-list.sh <param file|org='organisation> <script> [<local> <noisy> <additional> <additional> <additional>]
|
||||
parse-list.sh <param file|org='organisation'> <script> [<local> <noisy> <review> <additional*>]
|
||||
|
||||
* \<param file\|org='organisation'> name of file containing parameters or organisation which will be used to generate a list of all repos for input to \<script\>
|
||||
* \<script\> script to run (e.g. rename-e-smith-pkg.sh)
|
||||
@ -92,9 +92,20 @@ optional params can appear in any order
|
||||
|
||||
* \<local\> used with org= and will use local GITEA instance, default remote - will be passed to \<script\>
|
||||
* \<noisy\> show line being executed
|
||||
* \<review\> show line being executed, but NOT executing
|
||||
* \<review\> show line to be executed, but NOT executing
|
||||
* \<additional\> additional params to be passed (up to 3) e.g. debug,force,local
|
||||
|
||||
### example:
|
||||
|
||||
parse-list.sh org=smeserver git-migrate-repo.sh review
|
||||
|
||||
will echo the command that would be run for each repo in the smeserver organisation on the remote GITEA instance
|
||||
|
||||
git-migrate-repo.sh perl-Moo smeserver
|
||||
git-migrate-repo.sh buildsys-macros smeserver
|
||||
git-migrate-repo.sh clamav smeserver
|
||||
...
|
||||
|
||||
## git-post-create-repo.sh
|
||||
Update a repo created from a template (contribs,base or 3rd party) with things not able to be updated from the template:
|
||||
|
||||
|
@ -17,9 +17,11 @@ fi
|
||||
|
||||
# parse the command line parameters
|
||||
PROCESSORG=
|
||||
EXTRAPARAMS=
|
||||
if [[ $1 == org=* ]] ; then
|
||||
# using a list of the repos in this organisatoin as input
|
||||
PROCESSORG=${1#*=}
|
||||
EXTRAPARAMS=$PROCESSORG # add the org as the first additional param
|
||||
# Get the ini file and relevant parameters - only needed for org processing
|
||||
inifilename=$(echo ~)"/.smegit/config"
|
||||
if [ ! -e $inifilename ] ; then
|
||||
@ -59,7 +61,6 @@ fi
|
||||
|
||||
REVIEW=
|
||||
NOISY=
|
||||
EXTRAPARAMS=
|
||||
GITEAHOST=${remote_GITEAHOST}
|
||||
ACCESSTOKEN=${remote_GITEAACCESSTOKEN}
|
||||
for param in $3 $4 $5 $6; do
|
||||
|
Loading…
Reference in New Issue
Block a user