aboutsummaryrefslogtreecommitdiff
path: root/scripts/umask-check.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/umask-check.sh')
-rwxr-xr-xscripts/umask-check.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/umask-check.sh b/scripts/umask-check.sh
new file mode 100755
index 000000000..8c81484ad
--- /dev/null
+++ b/scripts/umask-check.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+UMASK=$(umask)
+
+if [ "${UMASK}" != "0002" -a "${UMASK}" != "0022" ]; then
+ cat <<EOF
+********************************************
+* WARNING: 'cpack -G DEB' / 'cpack -G RPM' *
+* might not work correctly due to umask, *
+* which is set to ${UMASK} *
+* but expected is either 0002 or 0022 *
+********************************************
+EOF
+fi