Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
earnest ma | e7aab11f9f | |
earnest ma | 2271857b7c | |
earnest ma | a1cffdb13f | |
earnest ma | a9e21971fb | |
earnest ma | 93652c35a3 | |
earnest ma | aa417bebab | |
earnest ma | 02bac12c49 |
14
.build.yml
14
.build.yml
|
@ -1,14 +0,0 @@
|
|||
image: ubuntu/next
|
||||
packages:
|
||||
- dpkg
|
||||
- dpkg-dev
|
||||
- scdoc
|
||||
- shellcheck
|
||||
|
||||
sources:
|
||||
- https://git.sr.ht/~earnestma/aptpkg
|
||||
|
||||
tasks:
|
||||
- test: |
|
||||
cd aptpkg
|
||||
make test
|
|
@ -0,0 +1,20 @@
|
|||
branches: main # Ideally, only run on pushes to main branch and PRs
|
||||
pipeline:
|
||||
pull-request:
|
||||
image: ubuntu:jammy
|
||||
when:
|
||||
event: [ pull_request ]
|
||||
commands:
|
||||
- apt -y update
|
||||
- apt -y install dpkg dpkg-dev scdoc shellcheck
|
||||
- make test
|
||||
|
||||
main:
|
||||
image: ubuntu:jammy
|
||||
when:
|
||||
event: push
|
||||
branch: main
|
||||
commands:
|
||||
- apt -y update
|
||||
- apt -y install dpkg dpkg-dev scdoc shellcheck
|
||||
- make test
|
2
LICENSE
2
LICENSE
|
@ -1,4 +1,4 @@
|
|||
Copyright © 2021 earnest ma <me@earne.link>
|
||||
Copyright © 2021-2022 earnest ma <me@earne.link>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the “Software”), to deal in
|
||||
|
|
23
README.md
23
README.md
|
@ -1,14 +1,11 @@
|
|||
# aptpkg
|
||||
[![sr.ht Project hub](https://img.shields.io/badge/sr.ht-Project%20hub-grey)](https://sr.ht/~earnestma/aptpkg)
|
||||
[![builds.sr.ht status](https://builds.sr.ht/~earnestma/aptpkg/commits.svg)](https://builds.sr.ht/~earnestma/aptpkg/commits?)
|
||||
|
||||
- **[aptpkg.earne.link packaging git
|
||||
repository](https://git.sr.ht/~earnestma/aptpkg-pkgs)**
|
||||
- **[aptpkg.earne.link Package archive setup/
|
||||
info](https://man.sr.ht/~earnestma/aptpkg)**
|
||||
**Please note:** I am not actively using or maintaining this project.
|
||||
|
||||
Easily create/ get debian packages. aptpkg can be used to easily create/ get
|
||||
debian packages, and can be used with a tool such as **reprepro**(1).
|
||||
- [packaging repo example](https://git.earne.link/earnestma/aptpkg-pkgs)
|
||||
- [wiki page](https://git.earne.link/earnestma/aptpkg/wiki)
|
||||
|
||||
aptpkg can be used to easily create/ get debian packages, and can be used with a tool such as **reprepro**(1).
|
||||
|
||||
## Prerequisites
|
||||
|
||||
|
@ -23,14 +20,8 @@ Run `aptpkg --help` or `man aptpkg` for more information.
|
|||
|
||||
## Contribute
|
||||
|
||||
Send patches to [this mailing
|
||||
list](https://lists.sr.ht/~earnestma/aptpkg-devel); you can follow [this
|
||||
guide](https://git-send-email.io) if you don't know how.
|
||||
|
||||
File **confirmed** bugs/ feature requests
|
||||
[here](https://todo.sr.ht/~earnestma/aptpkg)!
|
||||
Creating [issues](https://git.earne.link/earnestma/aptpkg/issues), [discussion](https://discuss.earne.link/t/earnest), or [pull requests](https://git.earne.link/earnestma/aptpkg/pulls) are welcome!
|
||||
|
||||
## License
|
||||
|
||||
`aptpkg` is published under an MIT License. See the LICENSE file for copyright
|
||||
and license details.
|
||||
`aptpkg` is published under an MIT License. See the LICENSE file for copyright and license details.
|
||||
|
|
20
aptpkg
20
aptpkg
|
@ -1,7 +1,7 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
# Init variables
|
||||
APTPKG_VERSION="1.0.1"
|
||||
APTPKG_VERSION="1.1.0"
|
||||
|
||||
# Show help
|
||||
show_help(){
|
||||
|
@ -15,8 +15,10 @@ For more documentation, run man aptpkg
|
|||
|
||||
Usage:
|
||||
aptpkg [directory]
|
||||
aptpkg --all [directory] Build all folders under directory
|
||||
aptpkg --auto (commit id) Autobuild modified packages from commit
|
||||
aptpkg -h, --help Show help
|
||||
aptpkg -v, --version Show version
|
||||
EOF
|
||||
}
|
||||
|
||||
|
@ -148,13 +150,29 @@ change_autobuild_pkgs(){
|
|||
done
|
||||
}
|
||||
|
||||
# Build all in directory
|
||||
build_all_in_dir(){
|
||||
[ -d "$1" ] || error_usage_die "Provide a directory"
|
||||
buildfile_folders=$(ls -d "$1"/*)
|
||||
|
||||
for ww in $buildfile_folders; do
|
||||
printf "\nBuilding %s\n\n" "$ww"
|
||||
aptpkg "$ww"
|
||||
done
|
||||
}
|
||||
|
||||
# Run!
|
||||
case $1 in
|
||||
-h|--help)
|
||||
show_help ;;
|
||||
--all)
|
||||
shift
|
||||
build_all_in_dir "$1" ;;
|
||||
--auto)
|
||||
shift
|
||||
change_autobuild_pkgs "$1" ;;
|
||||
-v|--version)
|
||||
echo "aptpkg $APTPKG_VERSION" ;;
|
||||
*)
|
||||
if [ $# -ne 1 ]; then
|
||||
error_usage_die "You must provide one directory"
|
||||
|
|
|
@ -8,9 +8,13 @@ aptpkg - easily create/ get debian packages
|
|||
|
||||
*aptpkg* _path_
|
||||
|
||||
*aptpkg* --all _path_
|
||||
|
||||
*aptpkg* --auto [git commit hash]
|
||||
|
||||
*aptpkg* --help
|
||||
*aptpkg* -h | --help
|
||||
|
||||
*aptpkg* -v | --version
|
||||
|
||||
# DESCRIPTION
|
||||
|
||||
|
@ -19,7 +23,11 @@ a tool such as *reprepro*(1).
|
|||
|
||||
Provide aptpkg with a path to a folder containing an *aptpkg*(5) build file.
|
||||
The --auto option can also be used to build modified packages based on a git
|
||||
commit hash, using _HEAD_ if one is not provided.
|
||||
commit hash, using _HEAD_ if one is not provided. The aptpkg script *must* be
|
||||
available in $PATH.
|
||||
|
||||
For mass rebuilds, aptpkg --auto can be used, passing a directory with folders
|
||||
under which the build files are located.
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
|
@ -27,5 +35,4 @@ commit hash, using _HEAD_ if one is not provided.
|
|||
|
||||
# AUTHORS
|
||||
|
||||
Sources, maintainers list, and how to submit bugs/ patches can be done at
|
||||
https://sr.ht/~earnestma/aptpkg.
|
||||
https://git.earne.link/earnestma/aptpkg
|
||||
|
|
|
@ -57,9 +57,8 @@ postinst, prerm, and postrm
|
|||
|
||||
*aptpkg*(1)
|
||||
|
||||
Files that aptpkg.earne.link uses: https://git.sr.ht/~earnestma/aptpkg-pkgs
|
||||
Some good packaging file examples: https://git.earne.link/earnestma/aptpkg-pkgs
|
||||
|
||||
# AUTHORS
|
||||
|
||||
Sources, maintainers list, and how to submit bugs/ patches can be done at
|
||||
https://sr.ht/~earnestma/aptpkg.
|
||||
https://git.earne.link/earnestma/aptpkg
|
||||
|
|
Loading…
Reference in New Issue