From 18d2585c33b111b14d41b4abea91b2494767a32c Mon Sep 17 00:00:00 2001 From: Tom Yan Date: Sat, 28 Apr 2018 21:15:19 +0800 Subject: [PATCH] python(2): improve cache cleanup command by using + instead of ; --- packages/python/build.sh | 6 +++--- packages/python2/build.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/python/build.sh b/packages/python/build.sh index e234be710..0552a7bd3 100644 --- a/packages/python/build.sh +++ b/packages/python/build.sh @@ -72,8 +72,8 @@ termux_step_post_massage () { cp $TERMUX_PKG_TMPDIR/pyconfig.h $TERMUX_PREFIX/include/python${_MAJOR_VERSION}m/ mv $TERMUX_PKG_TMPDIR/pyconfig.h $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/include/python${_MAJOR_VERSION}m/ - cd $TERMUX_PKG_MASSAGEDIR - find . -path '*/__pycache__*' -delete + #FIXME: Is this necessary? + find $TERMUX_PKG_MASSAGEDIR -depth -name __pycache__ -exec rm -rf {} + } termux_step_create_debscripts () { @@ -93,7 +93,7 @@ termux_step_create_debscripts () { # Uninstall everything installed through pip: echo "pip freeze 2> /dev/null | xargs pip uninstall -y > /dev/null 2> /dev/null" >> prerm # Cleanup __pycache__ folders: - echo "find $TERMUX_PREFIX/lib/python${_MAJOR_VERSION} -depth -name __pycache__ -exec rm -rf {} \;" >> prerm + echo "find $TERMUX_PREFIX/lib/python${_MAJOR_VERSION} -depth -name __pycache__ -exec rm -rf {} +" >> prerm # Remove contents of site-packages/ folder: echo "rm -Rf $TERMUX_PREFIX/lib/python${_MAJOR_VERSION}/site-packages/*" >> prerm # Remove pip and easy_install installed by ensurepip in postinst: diff --git a/packages/python2/build.sh b/packages/python2/build.sh index d8603d22a..f789b4e22 100644 --- a/packages/python2/build.sh +++ b/packages/python2/build.sh @@ -95,7 +95,7 @@ termux_step_create_debscripts () { # Uninstall everything installed through pip: echo "pip2 freeze 2> /dev/null | xargs pip2 uninstall -y > /dev/null 2> /dev/null" >> prerm # Cleanup *.pyc files - echo "find $TERMUX_PREFIX/lib/python${_MAJOR_VERSION} -depth -name *.pyc -exec rm -rf {} \;" >> prerm + echo "find $TERMUX_PREFIX/lib/python${_MAJOR_VERSION} -depth -name *.pyc -exec rm -rf {} +" >> prerm # Remove contents of site-packages/ folder: echo "rm -Rf $TERMUX_PREFIX/lib/python${_MAJOR_VERSION}/site-packages/*" >> prerm # Remove pip and easy_install installed by ensurepip in postinst: