feat[work]: add git-replace

This commit is contained in:
Leon Schwarzäugl 2025-10-21 13:10:54 +02:00
parent 95fa226b9e
commit 9da6bd15ab
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
3 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,9 @@
{ name, writeShellApplication, git, gnugrep, findutils, ... }:
writeShellApplication {
inherit name;
runtimeInputs = [ git gnugrep findutils ];
text = ''
git grep -l "$1" | xargs sed -i "s/$1/$2/g"
'';
}