mirror of
https://codeberg.org/privacy1st/arch
synced 2024-12-23 01:16:04 +01:00
fix
This commit is contained in:
parent
89db13eb8f
commit
a6b68fe752
@ -2,7 +2,7 @@
|
||||
_pkgname=repo
|
||||
_reponame=arch-pkg
|
||||
pkgname="de-p1st-$_pkgname"
|
||||
pkgver=0.0.3
|
||||
pkgver=0.0.4
|
||||
pkgrel=1
|
||||
pkgdesc="Bash script to manage remote Arch Linux repository"
|
||||
arch=('any')
|
||||
|
@ -3,6 +3,7 @@
|
||||
source /etc/de-p1st-repo/arch-repo.cfg || exit
|
||||
|
||||
|
||||
|
||||
cd "${LOCAL_PKG_DIR}" || exit
|
||||
|
||||
# get list of new packages, one package per line
|
||||
@ -13,9 +14,11 @@ rsync --ignore-existing --out-format="%n" --dry-run \
|
||||
rsync --ignore-existing --progress --human-readable \
|
||||
./*.pkg.tar.{xz,zst} "${REMOTE_SSH_HOST}":"${REMOTE_PKG_DIR}" || exit
|
||||
|
||||
|
||||
|
||||
# transfer new-pkg.txt
|
||||
rsync --ignore-times --checksum --progress --human-readable \
|
||||
new-pkg.txt "${REMOTE_SSH_HOST}":"${REMOTE_PKG_DIR}" || exit
|
||||
|
||||
# add each new package to database
|
||||
ssh "${REMOTE_SSH_HOST}" "/home/yoda/arch-repo-receive-new.sh"
|
||||
ssh "${REMOTE_SSH_HOST}" "/usr/bin/arch-repo-receive-new"
|
||||
|
@ -3,10 +3,13 @@
|
||||
source /etc/de-p1st-repo/arch-repo.cfg || exit
|
||||
|
||||
|
||||
|
||||
#
|
||||
# add new packages to database
|
||||
#
|
||||
function add_to_db(){
|
||||
echo "Adding new packages to db ..."
|
||||
|
||||
mapfile -t PKGS < <(cat new-pkg.txt)
|
||||
for PKG in "${PKGS[@]}"; do
|
||||
repo-add -n "${REMOTE_DB_NAME}.db.tar.gz" "${PKG}" || exit
|
||||
@ -14,10 +17,13 @@ function add_to_db(){
|
||||
}
|
||||
|
||||
|
||||
|
||||
#
|
||||
# generate index.html
|
||||
#
|
||||
function generate_index(){
|
||||
echo "Generating index.html with links to all packages ..."
|
||||
|
||||
echo '<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
@ -37,6 +43,7 @@ function generate_index(){
|
||||
}
|
||||
|
||||
|
||||
|
||||
cd "${REMOTE_PKG_DIR}" || exit
|
||||
add_to_db
|
||||
generate_index
|
||||
|
Loading…
Reference in New Issue
Block a user