aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2022-01-06 10:26:24 +1100
committerJustin Bedo <cu@cua0.org>2022-01-06 10:26:24 +1100
commitfd4634e2e259e730f1828737d306d95ae148e4b3 (patch)
tree6d4e55170db01ca717f2634be43c2e6ceca9b248
parent3b0f072f169b870114dd0edbf9407464cce48e96 (diff)
strip: rollback simplification
Fails sometimes when output is not a directory. This patch reverts to the previous implementation, but also patches in a fix for file names containing spaces.
-rw-r--r--default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/default.nix b/default.nix
index 3ec0450..1c550b8 100644
--- a/default.nix
+++ b/default.nix
@@ -151,7 +151,11 @@ let
stripCommand = ''
function rewriteOutput {
- find ''${!1} -type f -print0 | xargs -0 -n1 strip-store-paths
+ if [ -f ''${!1} ] ; then
+ strip-store-paths ''${!1}
+ else
+ find ''${!1} -type f -print0 | xargs -0 -n1 strip-store-paths
+ fi
}
for o in $outputs ; do
rewriteOutput $o