diff options
author | Colin Watson <cjwatson@debian.org> | 2022-03-08 16:32:12 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2022-03-08 16:32:12 +0000 |
commit | 47f9458796927596ac5d66aafeb0f31df925bcf5 (patch) | |
tree | 175435d21250e602df36e5ff012d97e37c926dc6 /tools | |
parent | cddae82c74ecdcc908adfd4730968d4ee237c13c (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-x | tools/mkcatdirs | 10 |
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 |