mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 21:09:00 +02:00
locate: fix creation of the parent directory of of locate database
This commit is contained in:
parent
90b08c29d2
commit
c06a10e05f
|
@ -131,7 +131,7 @@ in {
|
||||||
path = mkIf (!isMLocate) [ pkgs.su ];
|
path = mkIf (!isMLocate) [ pkgs.su ];
|
||||||
script =
|
script =
|
||||||
''
|
''
|
||||||
install -m ${if isMLocate then "0750" else "0755"} -o root -g ${if isMLocate then "mlocate" else "root"} -d $(dirname ${cfg.output})
|
mkdir -m 0755 -p ${dirOf cfg.output}
|
||||||
exec ${cfg.locate}/bin/updatedb \
|
exec ${cfg.locate}/bin/updatedb \
|
||||||
${optionalString (cfg.localuser != null) ''--localuser=${cfg.localuser}''} \
|
${optionalString (cfg.localuser != null) ''--localuser=${cfg.localuser}''} \
|
||||||
--output=${toString cfg.output} ${concatStringsSep " " cfg.extraFlags}
|
--output=${toString cfg.output} ${concatStringsSep " " cfg.extraFlags}
|
||||||
|
|
Loading…
Reference in a new issue