add rename-e-smith-pkg.sh comments + tidy

This commit is contained in:
Trevor Batley 2023-06-01 06:38:29 +02:00
parent 2c54961330
commit f28c8f337a

View File

@ -4,30 +4,60 @@ Utilities to use with smeserver on Koozali.org GITEA instance
Just a repackaging of some of Brian Read's tools with some modifications for the new git structure and some tidy-up of the ini file and debug statements Just a repackaging of some of Brian Read's tools with some modifications for the new git structure and some tidy-up of the ini file and debug statements
* config\ ## config
sample ~/.smegit/config or /etc/smegit.ini file - fill in your details\ sample ~/.smegit/config or /etc/smegit.ini file - fill in your details\
It will use the user config first and system ini, if user config does not exist It will use the user config first and system ini, if user config does not exist
* git-cvs2git.sh\ ## git-cvs2git.sh
copy current cvs version of a package across to git in new structure\ copy current cvs version of a package across to git in new structure
git-cvs2git.sh \<repository\> \<organisation\> \[\<local\>\]\
\<organisation\> can ONLY be smeserver or smecontribs\
\<local\> will migrate into your local GITEA (in config), otherwise remote GITEA
* git-get-and-build-repo.sh\ git-cvs2git.sh <repository> <organisation> [<local>]
bring down current git repository and run mockbuild\
git-get-and-build.sh \<organisation\> \<repository\> \[\<local\>\]\
\<local\> will build from local GITEA (in config), otherwise from remote GITEA
* git-migrate-repo.sh\ * \<repository\> repository (package) to be migrated (e.g. smeserver-yum)\
create mirror or copy of src.koozali.org repository in a local GITEA instance\ * \<organisation\> can ONLY be smeserver or smecontribs\
git-migrate-repo.sh \<repository\> \<organisation\> \[\<copy|mirror\> \<target organisation\>\]\ * \<local\> will migrate into your local GITEA (in config), otherwise remote GITEA
\<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
* git-migrate-org.sh\ ## git-get-and-build-repo.sh
create mirrors of all repos for an organisation in a local GITEA instance\ bring down current git repository and run mockbuild
git-migrate-org.sh \<organisation\> \[\<copy|mirror\> \<review\> \<target organisation\>\]\
\<copy|mirror\> will create local repos as either a copy or a mirror of the remote repos (default = copy)\ git-get-and-build.sh <organisation> <repository> [<local>]
\<review\> will just list the repos to be migrated, rather than doing it\
\<target organisation\> within your local GITEA, otherwise local user - must exist already * \<repository\> repository (package) to be built (e.g. smeserver-yum)\
* \<organisation\> can ONLY be smeserver or smecontribs\
* \<local\> will build from local GITEA (in config), otherwise from remote GITEA
## 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>]
* \<repository\> repository (package) to be copied (e.g. smeserver-yum)\
* \<organisation\> can be any repository on the remote GITEA\
* \<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
## git-migrate-org.sh
create mirrors of all repos for an organisation in a local GITEA instance
git-migrate-org.sh <organisation> [<copy|mirror> <review> <target organisation>]
* \<organisation\> can be any repository on the remote GITEA\
* \<copy|mirror\> will create local repos as either a copy or a mirror of the remote repos (default = copy)\
* \<review\> will just list the repos to be migrated, rather than doing it\
* \<target organisation\> within your local GITEA, otherwise local user - must exist already
## rename-e-smith-pkg.sh
Rename an e-smith package as smeserver and change relevant files
rename-emith-pkg.sh <pkg> [<organisation> <local> <force> <debug>]
* \<pkg\> Module name to be renamed e.g. e-smith-dnscache
optional parameters, can appear in any order
* \<organisation\> (any gitea organisation smeserver, smecontribs or user - defaults to smeserver)\
* \<local\> will use parameters set for local repository else it will use remote\
* \<force\> will automagically delete an existing repo, otherwise it will prompt\
* \<debug\> run in debug mode
This works whether the repo and local files exist of not (it deletes them if necessary)