feat: del, add, serve; updated: readme.md
This commit is contained in:
parent
0f88c1ea40
commit
ef2e47e088
@ -6,8 +6,8 @@ A Debian repository management tool.
|
||||
__Warning! This software is still under development and is not intended for stable use.__
|
||||
|
||||
### Todo
|
||||
- [ ] finish add feature
|
||||
- [ ] create del feature
|
||||
- [x] finish add feature
|
||||
- [x] create del feature
|
||||
- [ ] multiple repositories feature
|
||||
- [ ] signing repositories using GPG
|
||||
|
||||
@ -15,7 +15,7 @@ __Warning! This software is still under development and is not intended for stab
|
||||
`Debrepo` is a software tool designed for creating and managing Debian repositories for `*.deb` packages, providing a lightweight and user-friendly alternative to more complex tools like `reprepo` or `aptly`. While these alternatives may offer more advanced features, Debrepo focuses on providing essential functionality and ease of use for repository management, allowing users to easily add, remove, and update packages within their repositories. With Debrepo, users can efficiently manage their Debian repositories without the unnecessary complexity of more advanced tools.
|
||||
|
||||
## Dependencies
|
||||
Lorem, Ipsum, Dolor
|
||||
- `sh`, `dpkg`, `gpg`, `python3`
|
||||
|
||||
## Installation
|
||||
### from deb package
|
||||
@ -36,6 +36,8 @@ OPTIONS:
|
||||
add deb package to repository
|
||||
del, -d, --del
|
||||
delete deb package from repository
|
||||
serve, -s, --serve
|
||||
serve repository using python built in http module
|
||||
help, -h, --help
|
||||
print help message
|
||||
-v, --version
|
||||
|
22
debrepo
22
debrepo
@ -8,14 +8,26 @@ if [ "$1" = "init" ] || [ "$1" = "-i" ] || [ "$1" = "--init" ]; then
|
||||
fi
|
||||
|
||||
if [ "$1" = "add" ] || [ "$1" = "-a" ] || [ "$1" = "--add" ]; then
|
||||
echo "add"
|
||||
$DEBPATH=""
|
||||
# copy deb file to repo folder structure
|
||||
cp "./$2" "./apt-repo/pool/main/"
|
||||
# generate package and release file
|
||||
$DIR/scripts/addPackage.sh $2 && echo "debrepo: package $2 was successfully added"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" = "del" ] || [ "$1" = "-d" ] || [ "$1" = "--del" ]; then
|
||||
echo "del"
|
||||
$DEBNAME=""
|
||||
rm -i "./apt-repo/pool/main/$2" && echo "debrepo: package $2 was successfully removed"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" = "list" ] || [ "$1" = "-l" ] || [ "$1" = "--list" ]; then
|
||||
echo "debrepo: list of packages"
|
||||
ls -l "./apt-repo/pool/main/"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" = "serve" ] || [ "$1" = "-s" ] ||[ "$1" = "--serve" ]; then
|
||||
python3 -m http.server
|
||||
exit
|
||||
fi
|
||||
|
||||
@ -40,6 +52,8 @@ OPTIONS:
|
||||
add deb package to repository
|
||||
del, -d, --del
|
||||
delete deb package from repository
|
||||
serve, -s, --serve
|
||||
serve repository using python built in http module
|
||||
help, -h, --help
|
||||
print help message
|
||||
-v, --version
|
||||
|
@ -1,12 +1,9 @@
|
||||
#!/bin/sh
|
||||
DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
|
||||
BASEF="hello-world_$VERSION""_amd64"
|
||||
echo $BASEF
|
||||
|
||||
# copy deb file to repo folder structure
|
||||
cp "./$BASEF.deb" "./apt-repo/pool/main/"
|
||||
# generate Packages file
|
||||
dpkg-scanpackages --multiversion --arch amd64 "./apt-repo/pool/" > "./apt-repo/dists/stable/main/binary-amd64/Packages"
|
||||
# generate Release file
|
||||
./generate-release.sh > "./apt-repo/dists/stable/Release"
|
||||
cd "./apt-repo/dists/stable/"
|
||||
$DIR/generate-release.sh > "Release"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user