Giter Site home page Giter Site logo

dominiksalvet / gitpack Goto Github PK

View Code? Open in Web Editor NEW
98.0 4.0 6.0 2.21 MB

Git-based package manager written in POSIX shell

License: MIT License

Shell 100.00%
gitpack git package-manager linux macos windows shell bash install update deployment open-source posix script cli shell-script command-line github unix installer

gitpack's Introduction

GitPack

GitPack example

CI status GitPack POSIX Shell Hits

GitPack stands on a simple idea – a Git repository is a package, its URL is the package name. Based on that it is possible to install/update your favorite Git projects as shown:

gitpack install <url>

And when they are no longer needed, uninstall them that way:

gitpack uninstall <url>

GitPack not only saves time for end-users to figure out how to install a Git project, but it also unifies the project development and distribution in a convenient place; its Git repository.

Do you want to try GitPack in your project? The section for developers will help you get started.

Table of Contents

Requirements

All you need to install and run GitPack is Linux/Unix environment and Git.

Windows users may simply use Git for Windows.

Installation

Local (user) installation:

wget -qO- https://raw.githubusercontent.com/dominiksalvet/gitpack/master/.install/initl.sh | sh

Global (system) installation:

wget -qO- https://raw.githubusercontent.com/dominiksalvet/gitpack/master/.install/initg.sh | sh

If you do not have wget, copy-paste the source code of one of the scripts into a shell terminal and execute it.

Once installed, you will use GitPack to manage even itself (e.g., for updating). Now start exploring.

Usage

If GitPack is run with root permissions (e.g., using sudo), it will use global access and perform global installations. Otherwise, a local approach for the current user will be used.

Install/update to the latest version:

gitpack install <url>

It uses the latest tag (latest commit if no tag) of the repository default branch.

Install/update/downgrade to a particular version:

gitpack install <url>=<version>

The <version> is any Git revision (tag name, branch name, commit hash).

Uninstall (version is detected automatically):

gitpack uninstall <url>

Show the status of a project:

gitpack status <url>

List all installed projects:

gitpack list

Use gitpack help to see more arguments.

Examples

To better understand how GitPack works, there are some examples below.

  • Install a simple game with pathfinding locally (latest version):
$ gitpack install github.com/dominiksalvet/pathfinding-robots
>>> running install for github.com/dominiksalvet/pathfinding-robots
downloading repository
reading status database
using automatic candidate version
installing version 1.1.0
running script .install/install-local
copying files
adding to status database
<<< done; successfully installed
  • Use URL with no HTTPS and other adjustments (e.g., for SSH):
$ gitpack -r status [email protected]:dominiksalvet/vhdldep.git
>>> running status for [email protected]:dominiksalvet/vhdldep.git
downloading repository
reading status database
using automatic candidate version
<<< not installed; candidate is 2.2.0
  • List globally installed projects (display full commit hashes):
$ sudo gitpack -H list
github.com/dominiksalvet/gitpack 4ca05c10a9903251826a8d0addc25daf6808fffa
github.com/dominiksalvet/asus-fan-control cb6be871cdbf4453d9072118194198d75dd0b380
github.com/dominiksalvet/ux430ua-jack-volume 208f1a7bce8644482abdfa14107f90358a75bb1b
  • GitPack uses different paths for local and global access:
$ gitpack paths
state-dir /home/dominik/.local/share/gitpack
cache-dir /home/dominik/.cache/gitpack
lock-path /var/lock/gitpack-1000

$ sudo gitpack paths
state-dir /var/lib/gitpack
cache-dir /var/cache/gitpack
lock-path /var/lock/gitpack-0

Did you know that GitPack has sleek tab completion for Bash shells?

For Developers

There are many reasons why developers should like GitPack:

  • Tight integration with Git
  • Any programming language may be used
  • Runs on Linux, macOS, and other Unixes
  • Runs on Windows (after some setup)
  • Easy and flexible repository adaptation

GitPack shines when installing the following:

  • Scripts with no/few dependencies
  • Binaries directly present in the repository
  • Simple compiled programs
  • Other repository content (e.g., themes)

Unsure? There is even more in GitPack:

  • Simple by design
  • Delta updates
  • Smart repository cache
  • POSIX-friendly (i.e., very portable)
  • Standalone script (for advanced uses)
  • Suitable even for self-hosted Git services

So are you ready to try GitPack in your project? Then see how it works.

Badge

Projects that use GitPack work best with the following sleek badge:

GitPack

In markdown:

[![GitPack](https://img.shields.io/badge/-GitPack-571997)](https://github.com/topics/gitpack)

Useful Resources

gitpack's People

Contributors

dominiksalvet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gitpack's Issues

Should the GitPack installation be silent?

What is your question?
What do you think about the GitPack's installation as stated in the Install section of README.dm file? Should Git clone and checkout be silent/quiet not to confuse you, or is it ok as it is?

I would like to hear your opinions! 🚀 Thank you! ❤️

GitPack 1.1.0 installation fails and throws E9

Environment
State GitPack version and OS information.
Error before local installation of 1.1.0 finalizes on Xubuntu 22.04 LTS

Description
Describe the bug.
Does not install, throwing E9

Replication
State steps to replicate the bug.

Additional context
Add expected behavior or solution and any other context.
I tried installing GitPack locally, but got the following error messages. Any hints? Thanks for the tool, btw :)

christoph@ASUS-Laptop:/media/ramdisk$ wget -qO- https://raw.githubusercontent.com/dominiksalvet/gitpack/master/.install/initl.sh | sh
installing GitPack locally

running install for github.com/dominiksalvet/gitpack
downloading repository
reading status database
using automatic candidate version
installing version 1.1.0
E9: missing script for local installation on Linux
repository developer may help
christoph@ASUS-Laptop:/media/ramdisk$ wget -qO- https://raw.githubusercontent.com/dominiksalvet/gitpack/master/.install/initl.sh | sh
installing GitPack locally
mkdir: das Verzeichnis »/tmp/first-gitpack/1000/“ kann nicht angelegt werden: Die Datei existiert bereits
christoph@ASUS-Laptop:/media/ramdisk$ mv /tmp/first-gitpack /tmp/first-gitpack_x
christoph@ASUS-Laptop:/media/ramdisk$ wget -qO- https://raw.githubusercontent.com/dominiksalvet/gitpack/master/.install/initl.sh | sh
installing GitPack locally
running install for github.com/dominiksalvet/gitpack
local repository fresh
reading status database
using automatic candidate version
installing version 1.1.0
E9: missing script for local installation on Linux
repository developer may help
christoph@ASUS-Laptop:/media/ramdisk$

Regards,
Christoph

Bug with badge

Environment
Ubuntu 18.04 WSL

Describe the bug
When added the gitpack badge to readme bug happened. In front of displaying Git and gitpack_test (my test repo), it only displays git and Pack. Problably problem with underscore.

Cant install

Environment
Ubuntu 20.04

Description
Cant install gitpack

Replication
When Run on console wget -qO- https://raw.githubusercontent.com/dominiksalvet/gitpack/master/.install/initg.sh | sh i get: installing GitPack globally sh: 17: git: not found

Asus ux430uar error on install

Hello.
Notebook - Asus ux430uar
OS opensuse tumbleweed
installing asus fan control I get an error

#/files/GIT/gitpack/src/gitpack install https://github.com/dominiksalvet/asus-fan-control
fatal: Invalid object name refs/remote/HEAD
<ERROR> install https://github.com/dominiksalvet/asus-fan-control

/files/GIT/gitpack/src/gitpack - directory where gitpсk is installed locally

Please, help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.