Browse Source

clean.sh & build-package.sh: avoid errors in case chmod's target dir is not exist

android-5
Leonid Plyushch 6 years ago
parent
commit
30bb1ff752
No known key found for this signature in database GPG Key ID: 45F2964132545795
  1. 2
      clean.sh
  2. 3
      scripts/build/termux_step_start_build.sh

2
clean.sh

@ -6,5 +6,5 @@ set -e -u
test -f $HOME/.termuxrc && . $HOME/.termuxrc
: ${TERMUX_TOPDIR:="$HOME/.termux-build"}
chmod +w -R $TERMUX_TOPDIR
[ -d "$TERMUX_TOPDIR" ] && chmod +w -R $TERMUX_TOPDIR
rm -Rf /data/* $TERMUX_TOPDIR

3
scripts/build/termux_step_start_build.sh

@ -95,7 +95,8 @@ termux_step_start_build() {
# Following directories may contain objects with RO-only permissions which
# makes them undeletable. We need fix that.
chmod +w -R "$TERMUX_PKG_BUILDDIR" "$TERMUX_PKG_SRCDIR"
[ -d "$TERMUX_PKG_BUILDDIR" ] && chmod +w "$TERMUX_PKG_BUILDDIR"
[ -d "$TERMUX_PKG_SRCDIR" ] && chmod +w "$TERMUX_PKG_SRCDIR"
# Cleanup old state:
rm -Rf "$TERMUX_PKG_BUILDDIR" \

Loading…
Cancel
Save