[packages/rpm-build-tools] builder: bring back changing directory to original $(pwd) but check for its existence first

atler atler at pld-linux.org
Wed Aug 31 11:39:17 CEST 2022


commit cb6bf22aa1aa8b3ef0d03624854d449cc316bbb1
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Aug 31 11:37:53 2022 +0200

    builder: bring back changing directory to original $(pwd) but check for its existence first

 builder.sh | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/builder.sh b/builder.sh
index 68bb875..d911c21 100755
--- a/builder.sh
+++ b/builder.sh
@@ -2756,5 +2756,6 @@ esac
 if [ -f "`pwd`/.${SPECFILE}_INSTALLED_PACKAGES" -a "$REMOVE_BUILD_REQUIRES" != "" ]; then
 	rm "`pwd`/.${SPECFILE}_INSTALLED_PACKAGES"
 fi
+test -d "$__PWD" && cd "$__PWD"
 
 # vi:syntax=sh:ts=4:sw=4:noet
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/cb6bf22aa1aa8b3ef0d03624854d449cc316bbb1



More information about the pld-cvs-commit mailing list