mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-06 22:54:16 +02:00
Remove local-only AUR sync script from repository
This commit is contained in:
@@ -10,10 +10,3 @@ Before publishing:
|
|||||||
1. Generate `.SRCINFO` with `makepkg --printsrcinfo > .SRCINFO` inside each package directory.
|
1. Generate `.SRCINFO` with `makepkg --printsrcinfo > .SRCINFO` inside each package directory.
|
||||||
2. Build-test locally with `makepkg -si`.
|
2. Build-test locally with `makepkg -si`.
|
||||||
3. Push each package to its own AUR Git repository (`aur@aur.archlinux.org:bearhub.git` and `aur@aur.archlinux.org:bearhub-git.git`).
|
3. Push each package to its own AUR Git repository (`aur@aur.archlinux.org:bearhub.git` and `aur@aur.archlinux.org:bearhub-git.git`).
|
||||||
|
|
||||||
Automation:
|
|
||||||
|
|
||||||
- You can sync both local AUR clones with one command:
|
|
||||||
- `scripts/sync-aur-packaging.sh`
|
|
||||||
- Optional auto-commit and push:
|
|
||||||
- `scripts/sync-aur-packaging.sh --push`
|
|
||||||
|
|||||||
@@ -1,88 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
||||||
SRC_BASE="${ROOT_DIR}/packaging/aur"
|
|
||||||
|
|
||||||
AUR_BASE_DEFAULT="${HOME}/Projekte/development/current/aur"
|
|
||||||
AUR_BASE="${AUR_BASE_DEFAULT}"
|
|
||||||
DO_PUSH=0
|
|
||||||
|
|
||||||
usage() {
|
|
||||||
cat <<EOF
|
|
||||||
Usage: $(basename "$0") [--aur-base <path>] [--push]
|
|
||||||
|
|
||||||
Synchronizes PKGBUILD and .SRCINFO from:
|
|
||||||
${SRC_BASE}/{bearhub,bearhub-git}
|
|
||||||
to local AUR clones:
|
|
||||||
<aur-base>/{bearhub,bearhub-git}
|
|
||||||
|
|
||||||
Options:
|
|
||||||
--aur-base <path> Local directory containing AUR git clones
|
|
||||||
(default: ${AUR_BASE_DEFAULT})
|
|
||||||
--push Also run git commit + git push in each AUR repo
|
|
||||||
-h, --help Show this help
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
|
||||||
case "$1" in
|
|
||||||
--aur-base)
|
|
||||||
AUR_BASE="$2"
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
--push)
|
|
||||||
DO_PUSH=1
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-h|--help)
|
|
||||||
usage
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unknown argument: $1" >&2
|
|
||||||
usage
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
sync_one() {
|
|
||||||
local pkg="$1"
|
|
||||||
local src_dir="${SRC_BASE}/${pkg}"
|
|
||||||
local dst_dir="${AUR_BASE}/${pkg}"
|
|
||||||
|
|
||||||
if [[ ! -d "${src_dir}" ]]; then
|
|
||||||
echo "[ERROR] Missing source directory: ${src_dir}" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -d "${dst_dir}/.git" ]]; then
|
|
||||||
echo "[ERROR] Missing AUR git clone: ${dst_dir}" >&2
|
|
||||||
echo " Clone first: git clone ssh://aur@aur.archlinux.org/${pkg}.git ${dst_dir}" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
rsync -av --exclude='.git' "${src_dir}/" "${dst_dir}/"
|
|
||||||
rm -rf "${dst_dir}/src" "${dst_dir}/pkg"
|
|
||||||
|
|
||||||
if [[ "${DO_PUSH}" -eq 1 ]]; then
|
|
||||||
(
|
|
||||||
cd "${dst_dir}"
|
|
||||||
git add PKGBUILD .SRCINFO
|
|
||||||
if git diff --cached --quiet; then
|
|
||||||
echo "[${pkg}] No changes to commit."
|
|
||||||
else
|
|
||||||
git commit -m "Sync packaging from bearhub main repo"
|
|
||||||
git push
|
|
||||||
fi
|
|
||||||
)
|
|
||||||
else
|
|
||||||
echo "[${pkg}] Synced. Review and push manually in: ${dst_dir}"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
sync_one "bearhub"
|
|
||||||
sync_one "bearhub-git"
|
|
||||||
|
|
||||||
echo "Done."
|
|
||||||
Reference in New Issue
Block a user