Refactor to add new metafiles subcommand

This commit is contained in:
Starbeamrainbowlabs 2020-01-14 17:26:19 +00:00
parent 08a64effe9
commit cf4ddd4f99
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -47,6 +47,7 @@ if [[ "$#" -lt 1 ]]; then
echo -e " ${CACTION}setup${RS} - Perform initial setup";
echo -e " ${CACTION}update${RS} - Scan for new packages and add them to the repository";
echo -e " ${CACTION}update-cron${RS} - Like ${CACTION}update${RS}, but silent unless something goes wrong";
echo -e " ${CACTION}metafiles${RS} - Rebuild the repository metafiles only (useful if you've manually fiddled with the repo packages)";
echo -e "";
exit 1;
@ -137,13 +138,15 @@ task_update() {
execute dpkg-sig -k "${gpg_key_id}" -s builder "*.deb";
task_end $?;
tasks_run "metafiles";
}
task_metafiles() {
task_begin "Building packages file";
apt-ftparchive packages . >Packages;
execute bzip2 -kf Packages;
task_end $?;
task_begin "Generating release file";
apt-ftparchive release . >Release;
task_end $?;