Support dry run in activation script

If the `DRY_RUN` variable is set then no actual change should be
performed. Only printing what actions would be taken.
This commit is contained in:
Robert Helgesson 2017-01-16 00:06:27 +01:00
parent a5c8362f7b
commit b1f84ada60
No known key found for this signature in database
GPG key ID: C3DB11069E65DC86
3 changed files with 29 additions and 9 deletions

View file

@ -183,7 +183,11 @@ in
dconfPath = "/org/gnome/terminal/legacy/";
in
''
${pkgs.gnome3.dconf}/bin/dconf load ${dconfPath} < ${sf}
if [[ $DRY_RUN ]]; then
echo ${pkgs.gnome3.dconf}/bin/dconf load ${dconfPath} "<" ${sf}
else
${pkgs.gnome3.dconf}/bin/dconf load ${dconfPath} < ${sf}
fi
'';
};
}