1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-26 21:19:45 +01:00

home-environment: reduce verbosity

This commit is contained in:
Robert Helgesson 2017-02-09 22:32:09 +01:00
parent 6794efdf68
commit ebe01057f8
No known key found for this signature in database
GPG key ID: C3DB11069E65DC86

View file

@ -240,11 +240,10 @@ in
for sourcePath in "$@" ; do for sourcePath in "$@" ; do
relativePath="$(realpath --relative-to "$oldGenFiles" "$sourcePath")" relativePath="$(realpath --relative-to "$oldGenFiles" "$sourcePath")"
targetPath="$HOME/$relativePath" targetPath="$HOME/$relativePath"
echo -n "Checking $targetPath"
if [[ -f "$newGenFiles/$relativePath" ]] ; then if [[ -f "$newGenFiles/$relativePath" ]] ; then
echo " exists" $VERBOSE_ECHO "Checking $targetPath exists"
else else
echo " gone (deleting)" echo "Checking $targetPath gone (deleting)"
$DRY_RUN_CMD rm $VERBOSE_ARG "$targetPath" $DRY_RUN_CMD rm $VERBOSE_ARG "$targetPath"
$DRY_RUN_CMD rmdir --ignore-fail-on-non-empty \ $DRY_RUN_CMD rmdir --ignore-fail-on-non-empty \
$VERBOSE_ARG -p "$(dirname "$targetPath")" $VERBOSE_ARG -p "$(dirname "$targetPath")"
@ -321,10 +320,10 @@ in
phases = [ "installPhase" ]; phases = [ "installPhase" ];
installPhase = installPhase =
"mkdir -pv $out\n" + "mkdir -p $out\n" +
concatStringsSep "\n" ( concatStringsSep "\n" (
mapAttrsToList (name: value: mapAttrsToList (name: value:
"install -v -D -m${value.mode} ${value.source} $out/${value.target}" "install -D -m${value.mode} ${value.source} $out/${value.target}"
) cfg.file ) cfg.file
); );
}; };
@ -335,12 +334,12 @@ in
phases = [ "installPhase" ]; phases = [ "installPhase" ];
installPhase = '' installPhase = ''
install -v -D -m755 ${sf} $out/activate install -D -m755 ${sf} $out/activate
substituteInPlace $out/activate \ substituteInPlace $out/activate \
--subst-var-by GENERATION_DIR $out --subst-var-by GENERATION_DIR $out
ln -vs ${home-files} $out/home-files ln -s ${home-files} $out/home-files
''; '';
}; };