From ba21dd9e342bd640b1bbaa82ebf015932390b18e Mon Sep 17 00:00:00 2001 From: Parabola Date: Sun, 5 Jan 2014 04:21:52 +0000 Subject: db-update: add hook for publishing generated sources --- db-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db-update') diff --git a/db-update b/db-update index 0359697..2fa23af 100755 --- a/db-update +++ b/db-update @@ -83,4 +83,4 @@ for repo in ${repos[@]}; do done done - +cp -rviT "${STAGING}/other/" "${FTP_BASE}/other/" -- cgit v1.2.3-2-g168b From 91f6039acb4ba915a3ca3fc366a7159656ec0dc1 Mon Sep 17 00:00:00 2001 From: Parabola Date: Mon, 6 Jan 2014 04:30:22 +0000 Subject: fix things --- db-update | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'db-update') diff --git a/db-update b/db-update index 2fa23af..2d4f28a 100755 --- a/db-update +++ b/db-update @@ -9,7 +9,7 @@ if [ $# -ge 1 ]; then fi # Find repos with packages to release -repos=($(find "${STAGING}" -mindepth 1 -maxdepth 1 -type d ! -empty -printf '%f ' 2>/dev/null)) +repos=($(find "${STAGING}" -mindepth 1 -maxdepth 1 -type d ! -empty ! -name other -printf '%f ' 2>/dev/null)) if [ $? -ge 1 ]; then die "Could not read ${STAGING}" fi @@ -39,10 +39,10 @@ for repo in ${repos[@]}; do die "Package ${repo}/$(basename ${pkg}) already exists in another repository" fi done - # This is fucking obnoxious -# if ! check_splitpkgs ${repo} ${pkgs[@]}; then -# die "Missing split packages for ${repo}" -# fi + # This is fucking obnoxious + #if ! check_splitpkgs ${repo} ${pkgs[@]}; then + # die "Missing split packages for ${repo}" + #fi else die "Could not read ${STAGING}" fi @@ -83,4 +83,13 @@ for repo in ${repos[@]}; do done done -cp -rviT "${STAGING}/other/" "${FTP_BASE}/other/" +cd "${STAGING}" +while read -r file; do + pub="${FTP_BASE}/${file}" + if [[ -f $pub ]]; then + warning "file already exists: %s" "${file}" + else + mkdir -p -- "${pub%/*}" + mv -vn "$file" "$pub" + fi +done < <(find other -type f) -- cgit v1.2.3-2-g168b From 6682aefeafb8d30899e464122864f56318ad7640 Mon Sep 17 00:00:00 2001 From: Parabola Date: Wed, 8 Jan 2014 05:20:12 +0000 Subject: Don't error about permissions on empty staging repos (feature #460) --- db-update | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'db-update') diff --git a/db-update b/db-update index 2d4f28a..b9b8015 100755 --- a/db-update +++ b/db-update @@ -23,11 +23,11 @@ done # check if packages are valid for repo in ${repos[@]}; do - if ! check_repo_permission "${repo}"; then - die "You don't have permission to update packages in ${repo}" - fi pkgs=($(getpkgfiles "${STAGING}/${repo}/"*${PKGEXT})) if [ $? -eq 0 ]; then + if [ ${#pkgs[@]} -gt 0 ] && ! check_repo_permission "${repo}"; then + die "You don't have permission to update packages in ${repo}" + fi for pkg in ${pkgs[@]}; do if [ -h "${pkg}" ]; then die "Package ${repo}/$(basename ${pkg}) is a symbolic link" @@ -92,4 +92,4 @@ while read -r file; do mkdir -p -- "${pub%/*}" mv -vn "$file" "$pub" fi -done < <(find other -type f) +done < <(find other sources -type f) -- cgit v1.2.3-2-g168b From 725ab5d12375dd593c375b1a494021bb96135d4f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 8 Jan 2014 00:30:36 -0500 Subject: db-update: remove 'other' from repo blacklist now that issue #460 is added --- db-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'db-update') diff --git a/db-update b/db-update index b9b8015..1fddb8a 100755 --- a/db-update +++ b/db-update @@ -9,7 +9,7 @@ if [ $# -ge 1 ]; then fi # Find repos with packages to release -repos=($(find "${STAGING}" -mindepth 1 -maxdepth 1 -type d ! -empty ! -name other -printf '%f ' 2>/dev/null)) +repos=($(find "${STAGING}" -mindepth 1 -maxdepth 1 -type d ! -empty -printf '%f ' 2>/dev/null)) if [ $? -ge 1 ]; then die "Could not read ${STAGING}" fi -- cgit v1.2.3-2-g168b