Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

octoleo/octozipo

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Octozipo - Convert Zip package to a repository.

Written by Llewellyn van der Merwe (@llewellynvdm)

Convert Zip packages to repositories and if they exist update and tag them.

Linted by #ShellCheck

Install

$ sudo curl -L "https://raw.githubusercontent.com/octoleo/octozipo/refs/heads/master/src/octozipo" -o /usr/local/bin/octozipo
$ sudo chmod +x /usr/local/bin/octozipo
  • Global environment file can be set at: /home/$USER/.config/octozipo/.env
  • OR/And Per projects environment file .octozipo inside the same directory as the zip files

Options:

VDM_ORG="octoleo"
VDM_ZIP_DIR="/home/user/path/to/zip/files"
VDM_GIT_URL="git.vdm.dev"
VDM_PUSH_CREATE=true
  • VDM_ORG: git.vdm.dev/[ORG] in the repository path (default: joomla)
  • VDM_ZIP_DIR: the full path to where you have placed all the zipped files (default: current dir)
  • VDM_GIT_URL: the base URI of your gitea system (default: git.vdm.dev)
  • VDM_PUSH_CREATE: switch to push-create repositories that don't already exist (default: false)

Usage

To see the help menu

$ octozipo -h

To update

$ octozipo --update

Help Menu (Octozipo)

Usage: octozipo [OPTION...]
        Options
        ======================================================
   -o | --org=[ORG]
        directory of the org/user repository
        default: joomla
        example: octozipo -o=joomla
        example: octozipo --org=joomla
        ======================================================
   -z | --zip-dir=<full-path-to-directory>
        full path to directory of the zip files
        default: $PWD
        example: octozipo -z=/home/username/zipfiles
        example: octozipo --zip-dir=/home/username/zipfiles
        ======================================================
   -g | --git-url=<url>
        git remote repository base url
        default: git.vdm.dev
        example: octozipo -g=git.vdm.dev
        example: octozipo --git-url=git.vdm.dev
        ======================================================
   -m | --mapper=<file>
        load the mapping file
        that convert zip names to repo names
        example: octozipo --mapper=/src/.mapper
        ======================================================
   -e | --env=<file>
        load the environment variables file
        example: octozipo --env=/src/.env
        ======================================================
   -p | --push-create
        switch to try push create new repositories
        this may not work with github
        example: octozipo -p
        example: octozipo --push-create
        ======================================================
   -s | --spacer=<char>
        set the spacer used in repo name
        default: -
        example: octozipo -s _
        example: octozipo --spacer=_
        ======================================================
   --git-date=<date>
        set the git commit date
        default: Actual Date
        example: octozipo --git-date="Feb 14 03:18:31"
        ======================================================
   --keep-repo
        switch to keep the repository directory
        example: octozipo --keep-repo
        ======================================================
   --keep-zip
        switch to keep the zip file
        example: octozipo --keep-zip
        ======================================================
   --use-xml-name
        use the name found in the xml as the repository name
        example: octozipo --use-xml-name
        ======================================================
   -d | --dry
        dry run of the program
        example: octozipo --dry
        ======================================================
   -q | --quiet
        mute all output messages
        example: octozipo --quiet
        ======================================================
   --debug
        tp print out all config details
        example: octozipo --debug
        ======================================================
   --update
        to update your install
        example: octozipo --update
        ======================================================
   --uninstall
        to uninstall this script
        example: octozipo --uninstall
        ======================================================
   -h|--help
        display this help menu
        example: octozipo -h
        example: octozipo --help
        ======================================================
                        Octozipo v2.0.0
        ======================================================

Example

Execute the script in the directory where your zip files are found

$ octozipo -o joomla -p

This will target the git.vdm.dev/joomla organization and if a package is unzipped and not found it will push to create that repository.

Uninstall

$ octozipo --uninstall

Free Software License

@copyright  Copyright (C) 2021 Llewellyn van der Merwe. All rights reserved.
@license    GNU General Public License version 2; see LICENSE.txt
Morty Proxy This is a proxified and sanitized view of the page, visit original site.