diff mbox series

builddeb: Consolidate consecutive chmod calls into one

Message ID 20201029153910.7502-1-svenjoac@gmx.de (mailing list archive)
State New, archived
Headers show
Series builddeb: Consolidate consecutive chmod calls into one | expand

Commit Message

Sven Joachim Oct. 29, 2020, 3:39 p.m. UTC
No need to call chmod three times when it can do everything at once.

Signed-off-by: Sven Joachim <svenjoac@gmx.de>
---
 scripts/package/builddeb | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

--
2.29.1
diff mbox series

Patch

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 91a502bb97e8..6a100c449579 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -42,11 +42,9 @@  create_package() {
 	else
 		chown -R root:root "$pdir"
 	fi
-	chmod -R go-w "$pdir"
-	# in case we are in a restrictive umask environment like 0077
-	chmod -R a+rX "$pdir"
-	# in case we build in a setuid/setgid directory
-	chmod -R ug-s "$pdir"
+	# a+rX in case we are in a restrictive umask environment like 0077
+	# ug-s in case we build in a setuid/setgid directory
+	chmod -R go-w,a+rX,ug-s "$pdir"

 	# Create the package
 	dpkg-gencontrol -p$pname -P"$pdir"