Date: Monday, February 15, 2021 @ 17:27:49 Author: kgizdov Revision: 861364
fix check_dir function so that it allows parsepkgbuild to function normally Modified: tensorflow/trunk/PKGBUILD ----------+ PKGBUILD | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2021-02-15 17:16:56 UTC (rev 861363) +++ PKGBUILD 2021-02-15 17:27:49 UTC (rev 861364) @@ -7,7 +7,7 @@ pkgname=(tensorflow tensorflow-opt tensorflow-cuda tensorflow-opt-cuda python-tensorflow python-tensorflow-opt python-tensorflow-cuda python-tensorflow-opt-cuda) pkgver=2.4.1 _pkgver=2.4.1 -pkgrel=3 +pkgrel=4 pkgdesc="Library for computation using data flow graphs for scalable machine learning" url="https://www.tensorflow.org/" license=('APACHE') @@ -33,6 +33,18 @@ } check_dir() { + # first make sure we do not break parsepkgbuild + if ! command -v cp &> /dev/null; then + >&2 echo "'cp' command not found. PKGBUILD is probably being checked by parsepkgbuild." + if ! command -v install &> /dev/null; then + >&2 echo "'install' command also not found. PKGBUILD must be getting checked by parsepkgbuild." + >&2 echo "Cannot check if directory '${1}' exists. Ignoring." + >&2 echo "If you are not running nacmap or parsepkgbuild, please make sure the PATH is correct and try again." + >&2 echo "PATH should not be '/dummy': PATH=$PATH" + return 0 + fi + fi + # if we are running normally, check the given path if [ -d "${1}" ]; then return 0 else
