From d23828e2cd3656ec0621d5245953f109a009f402 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Wed, 12 Mar 2025 19:02:03 +1100 Subject: install: dont duplicate imports Do not add import line if already present --- install/firefox.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'install') diff --git a/install/firefox.fish b/install/firefox.fish index 3f6c78c..f22a259 100755 --- a/install/firefox.fish +++ b/install/firefox.fish @@ -23,7 +23,8 @@ if test -d $HOME/.zen for profile in $HOME/.zen/*/chrome for file in userChrome userContent if test -f $profile/$file.css - echo -e "@import url('$dist/zen/$file.css');\n$(cat $profile/$file.css)" > $profile/$file.css + set -l imp "@import url('$dist/zen/$file.css');" + grep -qFx $imp $profile/$file.css || printf '%s\n%s' $imp "$(cat $profile/$file.css)" > $profile/$file.css else echo "@import url('$dist/zen/$file.css');" > $profile/$file.css end -- cgit v1.2.3-freya