1 Star 0 Fork 0

me-Mirror../shpkg

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
repo.md 2.66 KB
一键复制 编辑 原始数据 按行查看 历史
WMCB-Tech 提交于 2021-08-03 16:15 . update docs

About

Since shpkg 1.3.0. an experimental update function is implemented, this made it easy to add repos
requirement is git, zip, tar

Configs

The config file is in ~/.config/shpkg_repo.list or $XDG_CONFIG_HOME/shpkg_repo.list

An example of repolist file

# this is a comment
https://github.com/shpkg/ports.git
https://foo.bar/buildscripts.zip
https://foo.bar/buildscripts.tar.xz

when adding repos, *.git, *.zip, *.tar extension should be specified at the end to know what method is going to be used when fetching

Known bugs in the repolist file

  • Newlines are being treated as URL, an implementation fix is welcome (fixed in 1.3.1)
  • Comments are also being treated as URL, an implementation fix is welcome (fixed in 1.3.1)

Buildscript fetching

When fetching buildscripts through git or tarball, buildscripts is being placed in ~/.shpkg/

If *.zip, *.tar is being used, the contents are being extracted in ~/.shpkg/
However if the archive contains a subdirectory and the subdirectories contains all buildscripts. specify strip: uri option in the repolist

An example:

https://github.com/shpkg/ports.git
strip:https://foo.bar/buildscripts-inside-subdirectories.zip
strip:https://foo.bar/buildscripts-inside-subdirectories.tar.xz

when strip: is specified, it will be extracted in temporary directory then moves the buildscripts in ~/.shpkg/

if strip: isn't specified, it will treat it as build script

Note that if strip: was specified in git url. it is being ignored, please see Repository Structure if creating your own shpkg repo

Repository Structure

If creating a shpkg repo, the following directotu structure should be followed. in a nutshell:

git

shpkg-alternate-repo-root \
  -- package1 \
          -- SHPKG_BUILD
  -- package2 \
          -- SHPKG_BUILD

shpkg-alternate-repo-root - the git repo name, represents as repository root. would be:
https://github.com/foo/shpkg-alternate-repo-root

tar

If strip: should not be specified:

buildscripts.tar.* \
  -- package1 \
          -- SHPKG_BUILD
  -- package2 \
          -- SHPKG_BUILD

If strip: should be specified:

buildscripts-inside-subdirectories.tar.* \
  -- subdirectory \
    -- package1 \
            -- SHPKG_BUILD
    -- package2 \
            -- SHPKG_BUILD

zip

If strip: should not be specified:

buildscripts.zip \
  -- package1 \
          -- SHPKG_BUILD
  -- package2 \
          -- SHPKG_BUILD

If strip: should be specified:

buildscripts-inside-subdirectories.zip \
  -- subdirectory \
    -- package1 \
            -- SHPKG_BUILD
    -- package2 \
            -- SHPKG_BUILD
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/spz2020_admin/shpkg-install-mirrors.git
git@gitee.com:spz2020_admin/shpkg-install-mirrors.git
spz2020_admin
shpkg-install-mirrors
shpkg
master

搜索帮助

Cb406eda 1850385 E526c682 1850385