builddeb: Consolidate consecutive chmod calls into one
authorSven Joachim <svenjoac@gmx.de>
Thu, 29 Oct 2020 15:39:10 +0000 (16:39 +0100)
committerMasahiro Yamada <masahiroy@kernel.org>
Thu, 26 Jan 2023 03:43:33 +0000 (12:43 +0900)
No need to call chmod three times when it can do everything at once.

Signed-off-by: Sven Joachim <svenjoac@gmx.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/package/builddeb

index 67cd420dcf8900a33245ef33711d782c9d0098a1..ff5e7d8e380bba654657bf43dc544a571fd90e28 100755 (executable)
@@ -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"