diff --git a/thing.sh b/thing.sh index f8d0bce..b24cb43 100755 --- a/thing.sh +++ b/thing.sh @@ -7,27 +7,22 @@ fi cd aports aports_dir="$(pwd)" +git fetch git checkout --force "$branch" git reset --hard "$branch" -git fetch +git merge "origin/$branch" 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..." + . "$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] 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 + echo "[$0] [$package] Package not built yet, building..." fi echo "[$0] [$package] Patching APKBUILD to add $package-dbg..." @@ -39,5 +34,3 @@ for package in $(cat ../packages); do echo "[$0] [$package] !! FAILED TO BUILD !!" fi done - -git merge "origin/$branch"