mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-01-06 02:43:23 +00:00
This avoids "./" being part of the tar. "./" translates to the
systemroot / when we extract, and this is problematic since tar cannot
change permissions and ownerships of this folder. tar 1.34 gives an
error:
tar: .: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: Exiting with failure status due to previous errors
when we try to extract the data.tar.xz.
9 lines
202 B
Bash
9 lines
202 B
Bash
termux_step_create_datatar() {
|
|
if [ "$TERMUX_PKG_METAPACKAGE" = "true" ]; then
|
|
# Metapackage doesn't have data inside.
|
|
rm -rf data
|
|
fi
|
|
|
|
tar -cJf "$TERMUX_PKG_PACKAGEDIR/data.tar.xz" -H gnu data
|
|
}
|