Rivedi la copia dei sorgenti nel build-apk.sh per escludere correttamente la directory temporanea e i metadati VCS, migliorando la gestione dei percorsi.
This commit is contained in:
parent
0d9a5a88d2
commit
f2317404f4
1 changed files with 6 additions and 8 deletions
|
|
@ -46,14 +46,12 @@ trap 'rm -rf "$tmpdir"' EXIT
|
||||||
echo "Copia sorgenti in $tmpdir"
|
echo "Copia sorgenti in $tmpdir"
|
||||||
mkdir -p "$tmpdir/$srcdir_name"
|
mkdir -p "$tmpdir/$srcdir_name"
|
||||||
|
|
||||||
# Copy repository contents into temporary build dir, escludendo la dir temporanea e i metadati VCS.
|
# Copia solo la directory pack/alpine (cioè la directory dello script) nel tmpdir/$srcdir_name, escludendo la dir temporanea e i metadati VCS.
|
||||||
# Prefer rsync quando disponibile; altrimenti usa tar con pattern di esclusione.
|
if command -v rsync >/dev/null 2>&1; then
|
||||||
PROJECT_ROOT="$PKGDIR/../../"
|
rsync -a --exclude 'build-tmp-*' --exclude 'packages' --exclude '.git' "$PKGDIR/" "$tmpdir/$srcdir_name/"
|
||||||
if command -v rsync >/dev/null 2>&1; then
|
else
|
||||||
rsync -a --exclude 'pack/alpine/build-tmp-*' --exclude '.git' "$PROJECT_ROOT" "$tmpdir/$srcdir_name/"
|
(cd "$PKGDIR" && tar --exclude='build-tmp-*' --exclude='packages' --exclude='.git' -cf - .) | (cd "$tmpdir/$srcdir_name" && tar -xf -)
|
||||||
else
|
fi
|
||||||
(cd "$PROJECT_ROOT" && tar --exclude='pack/alpine/build-tmp-*' --exclude='.git' -cf - .) | (cd "$tmpdir/$srcdir_name" && tar -xf -)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Ensure APKBUILD is present in the source root (some setups expect it there)
|
# Ensure APKBUILD is present in the source root (some setups expect it there)
|
||||||
cp -f "$PKGDIR/APKBUILD" "$tmpdir/$srcdir_name/"
|
cp -f "$PKGDIR/APKBUILD" "$tmpdir/$srcdir_name/"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue