Skip to content
/ gpm Public

A fully customizable general purpose package manager

License

Notifications You must be signed in to change notification settings

8LWXpg/gpm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPM

So you want to make your own package manager?

For something that feels like overkill to create standalone package manager, but is just too lazy to manually check for updates and download.

Installation

cargo install --git https://github.com/8LWXpg/gpm.git

Quick Start

Initialize the package manager

gpm init

Add a new package type

gpm type add <NAME> <EXT> <SHELL>

Change your shell config at ~/.gpm/types.toml.

Note

EXT is the file extension of the script file.

Edit the script

Script file is created at ~/.gpm/scripts/<NAME>.<EXT>, see here for more information.

Add a new repository

gpm add <NAME> 

For more information see here.

Important

Package name must be the same as resulted file/folder name to work properly.

Add a package to the repository

gpm repo <NAME> add <NAME> <TYPE> [ARGS]...

Important

Package name must be the same as file/folder name in order to work properly.

Make an alias for the repo

alias <NAME>='gpm repo <NAME>'

Features

Port packages

  1. Remove ETag field under <repo>/version.toml with gpm repo <repo> remove-etag
  2. Add a new repository.
  3. Copy the <repo>/version.toml to the new repository.
  4. Update all packages with gpm repo <repo> update -a

Documentation

Windows

There's no standard way to pass arguments to executables in Windows, each executable has its own parsing logic. So, if you have issues with passing arguments to certain executables, please add a fix to the escape_win.rs file.