diff options
| author | nzbr <mail@nzbr.de> | 2022-12-28 12:04:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-28 12:04:30 +0100 |
| commit | 79fa1eb78f746c30e41f1be76a209a407b25dc9d (patch) | |
| tree | d24fbf7a99e720bf9fcc56deea66bc6480e5666e | |
| parent | f11173cca7f3ce899ae0c289fd79707498d7b63e (diff) | |
| parent | baf2ae72955c87e73f02b092d18f5dec98fab6c0 (diff) | |
Merge pull request #181 from nzbr/fix-start-menu-launchers
Fix copy-launchers activation script
| -rw-r--r-- | modules/wsl-distro.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/wsl-distro.nix b/modules/wsl-distro.nix index 0316c77..372925f 100644 --- a/modules/wsl-distro.nix +++ b/modules/wsl-distro.nix @@ -88,9 +88,13 @@ with lib; { copy-launchers = mkIf cfg.startMenuLaunchers ( stringAfter [ ] '' for x in applications icons; do - echo "Copying /usr/share/$x" - mkdir -p /usr/share/$x - ${pkgs.rsync}/bin/rsync -ar --delete $systemConfig/sw/share/$x/. /usr/share/$x + echo "setting up /usr/share/''${x}..." + if [[ -d $systemConfig/sw/share/$x ]]; then + mkdir -p /usr/share/$x + ${pkgs.rsync}/bin/rsync -ar --delete $systemConfig/sw/share/$x/. /usr/share/$x + else + rm -rf /usr/share/$x + fi done '' ); |
