mirror of
https://github.com/nix-community/impermanence
synced 2024-11-10 05:44:17 +00:00
home-manager: Simplify the directory creation
The checks should be unnecessary, since `mkdir -p` is idempotent.
This commit is contained in:
parent
4d655d7842
commit
48b5d5291c
1 changed files with 3 additions and 6 deletions
|
@ -232,12 +232,9 @@ in
|
|||
systemctl = "XDG_RUNTIME_DIR=\${XDG_RUNTIME_DIR:-/run/user/$(id -u)} ${config.systemd.user.systemctlPath}";
|
||||
in
|
||||
''
|
||||
if [[ ! -e ${targetDir} ]]; then
|
||||
mkdir -p ${targetDir}
|
||||
fi
|
||||
if [[ ! -e ${mountPoint} ]]; then
|
||||
mkdir -p ${mountPoint}
|
||||
fi
|
||||
mkdir -p ${targetDir}
|
||||
mkdir -p ${mountPoint}
|
||||
|
||||
if ${mount} | grep -F ${mountPoint}' ' >/dev/null; then
|
||||
if ! ${mount} | grep -F ${mountPoint}' ' | grep -F bindfs; then
|
||||
if ! ${mount} | grep -F ${mountPoint}' ' | grep -F ${targetDir}' ' >/dev/null; then
|
||||
|
|
Loading…
Reference in a new issue