clean.sh & build-package.sh: avoid errors in case chmod's target dir is not exist
This commit is contained in:
parent
33b93ef30d
commit
225b1c471f
2
clean.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
|
||||
|
|
|
@ -94,7 +94,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…
Reference in New Issue