commit 454b329c1da1781f3a27851ec4b6c517ef362959 Author: Nulo Date: Sat Dec 25 12:00:53 2021 -0300 Inicio diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..15df75e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +aports/ diff --git a/packages b/packages new file mode 100644 index 0000000..d5ffb43 --- /dev/null +++ b/packages @@ -0,0 +1,4 @@ +community/mako +community/iwd +community/foot +testing/kakoune diff --git a/thing.sh b/thing.sh new file mode 100755 index 0000000..f8d0bce --- /dev/null +++ b/thing.sh @@ -0,0 +1,43 @@ +#!/bin/sh -e +branch=3.15-stable +if test ! -d aports; then + git clone https://gitlab.alpinelinux.org/alpine/aports +fi + +cd aports +aports_dir="$(pwd)" + +git checkout --force "$branch" +git reset --hard "$branch" +git fetch + +for package in $(cat ../packages); do + cd "$aports_dir" + + echo "[$0] [$package] Checking changes" + if git diff --stat "origin/$branch" "$package" | grep -F "$package"; then + echo "[$0] [$package] Detected changes, building..." + else + echo "[$0] [$package] No changes." + . "$package/APKBUILD" + repo=${package%/*} + package_file="$HOME/packages/$repo/$(uname -m)/$pkgname-dbg-$pkgver-r$pkgrel.apk" + if test -f "$package_file"; then + echo "[$0] [$package] Package already built, skipping..." + continue + else + echo "[$0] [$package] Package not built yet, building..." + fi + fi + + echo "[$0] [$package] Patching APKBUILD to add $package-dbg..." + sed -i 's/subpackages="/subpackages="$pkgname-dbg /' "$package/APKBUILD" + + echo "[$0] [$package] Building..." + cd "$aports_dir/$package" + if ! abuild rootbld; then + echo "[$0] [$package] !! FAILED TO BUILD !!" + fi +done + +git merge "origin/$branch"