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
|
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
|
this software and associated documentation files (the “Software”), to deal in
|
||||||
|
|
23
README.md
23
README.md
|
@ -1,14 +1,11 @@
|
||||||
# aptpkg
|
# 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
|
**Please note:** I am not actively using or maintaining this project.
|
||||||
repository](https://git.sr.ht/~earnestma/aptpkg-pkgs)**
|
|
||||||
- **[aptpkg.earne.link Package archive setup/
|
|
||||||
info](https://man.sr.ht/~earnestma/aptpkg)**
|
|
||||||
|
|
||||||
Easily create/ get debian packages. aptpkg can be used to easily create/ get
|
- [packaging repo example](https://git.earne.link/earnestma/aptpkg-pkgs)
|
||||||
debian packages, and can be used with a tool such as **reprepro**(1).
|
- [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
|
## Prerequisites
|
||||||
|
|
||||||
|
@ -23,14 +20,8 @@ Run `aptpkg --help` or `man aptpkg` for more information.
|
||||||
|
|
||||||
## Contribute
|
## Contribute
|
||||||
|
|
||||||
Send patches to [this mailing
|
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!
|
||||||
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)!
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
`aptpkg` is published under an MIT License. See the LICENSE file for copyright
|
`aptpkg` is published under an MIT License. See the LICENSE file for copyright and license details.
|
||||||
and license details.
|
|
||||||
|
|
20
aptpkg
20
aptpkg
|
@ -1,7 +1,7 @@
|
||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
# Init variables
|
# Init variables
|
||||||
APTPKG_VERSION="1.0.1"
|
APTPKG_VERSION="1.1.0"
|
||||||
|
|
||||||
# Show help
|
# Show help
|
||||||
show_help(){
|
show_help(){
|
||||||
|
@ -15,8 +15,10 @@ For more documentation, run man aptpkg
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
aptpkg [directory]
|
aptpkg [directory]
|
||||||
|
aptpkg --all [directory] Build all folders under directory
|
||||||
aptpkg --auto (commit id) Autobuild modified packages from commit
|
aptpkg --auto (commit id) Autobuild modified packages from commit
|
||||||
aptpkg -h, --help Show help
|
aptpkg -h, --help Show help
|
||||||
|
aptpkg -v, --version Show version
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,13 +150,29 @@ change_autobuild_pkgs(){
|
||||||
done
|
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!
|
# Run!
|
||||||
case $1 in
|
case $1 in
|
||||||
-h|--help)
|
-h|--help)
|
||||||
show_help ;;
|
show_help ;;
|
||||||
|
--all)
|
||||||
|
shift
|
||||||
|
build_all_in_dir "$1" ;;
|
||||||
--auto)
|
--auto)
|
||||||
shift
|
shift
|
||||||
change_autobuild_pkgs "$1" ;;
|
change_autobuild_pkgs "$1" ;;
|
||||||
|
-v|--version)
|
||||||
|
echo "aptpkg $APTPKG_VERSION" ;;
|
||||||
*)
|
*)
|
||||||
if [ $# -ne 1 ]; then
|
if [ $# -ne 1 ]; then
|
||||||
error_usage_die "You must provide one directory"
|
error_usage_die "You must provide one directory"
|
||||||
|
|
|
@ -8,9 +8,13 @@ aptpkg - easily create/ get debian packages
|
||||||
|
|
||||||
*aptpkg* _path_
|
*aptpkg* _path_
|
||||||
|
|
||||||
|
*aptpkg* --all _path_
|
||||||
|
|
||||||
*aptpkg* --auto [git commit hash]
|
*aptpkg* --auto [git commit hash]
|
||||||
|
|
||||||
*aptpkg* --help
|
*aptpkg* -h | --help
|
||||||
|
|
||||||
|
*aptpkg* -v | --version
|
||||||
|
|
||||||
# DESCRIPTION
|
# 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.
|
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
|
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
|
# SEE ALSO
|
||||||
|
|
||||||
|
@ -27,5 +35,4 @@ commit hash, using _HEAD_ if one is not provided.
|
||||||
|
|
||||||
# AUTHORS
|
# AUTHORS
|
||||||
|
|
||||||
Sources, maintainers list, and how to submit bugs/ patches can be done at
|
https://git.earne.link/earnestma/aptpkg
|
||||||
https://sr.ht/~earnestma/aptpkg.
|
|
||||||
|
|
|
@ -57,9 +57,8 @@ postinst, prerm, and postrm
|
||||||
|
|
||||||
*aptpkg*(1)
|
*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
|
# AUTHORS
|
||||||
|
|
||||||
Sources, maintainers list, and how to submit bugs/ patches can be done at
|
https://git.earne.link/earnestma/aptpkg
|
||||||
https://sr.ht/~earnestma/aptpkg.
|
|
||||||
|
|
Loading…
Reference in New Issue