summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2022-03-08 16:32:12 +0000
committerColin Watson <cjwatson@debian.org>2022-03-08 16:32:12 +0000
commit47f9458796927596ac5d66aafeb0f31df925bcf5 (patch)
tree175435d21250e602df36e5ff012d97e37c926dc6 /tools
parentcddae82c74ecdcc908adfd4730968d4ee237c13c (diff)
mkcatdirs: Refactor using install(1)
I'm not sure this script is widely-used, but it might as well work. It previously relied on `mkinstalldirs`, which is a build tool not typically installed on end-user systems. * tools/mkcatdirs: Refactor cat directory creation using install(1).
Diffstat (limited to 'tools')
-rwxr-xr-xtools/mkcatdirs10
1 files changed, 2 insertions, 8 deletions
diff --git a/tools/mkcatdirs b/tools/mkcatdirs
index b7dbe13d..596b2a49 100755
--- a/tools/mkcatdirs
+++ b/tools/mkcatdirs
@@ -108,14 +108,8 @@ do
then
echo " "
# shellcheck disable=SC2086
- echo "mkinstalldirs $catdirs" &&
- mkinstalldirs $catdirs &&
- echo "chown $owner $catdirs" &&
- chown "$owner" $catdirs &&
- echo "chgrp $group $catdirs" &&
- chgrp "$group" $catdirs &&
- echo "chmod $mode $catdirs" &&
- chmod "$mode" $catdirs ||
+ echo "install -d -o $owner -g $group -m $mode $catdirs" &&
+ install -d -o "$owner" -g "$group" -m "$mode" $catdirs ||
exit $?
fi