diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-03-12 19:02:03 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-03-12 19:02:03 +1100 |
| commit | d23828e2cd3656ec0621d5245953f109a009f402 (patch) | |
| tree | 5d50a9c4da7482f0625f73c4ad6cbec6dbc748ba /install | |
| parent | install: fix btop install (diff) | |
| download | caelestia-cli-d23828e2cd3656ec0621d5245953f109a009f402.tar.gz caelestia-cli-d23828e2cd3656ec0621d5245953f109a009f402.tar.bz2 caelestia-cli-d23828e2cd3656ec0621d5245953f109a009f402.zip | |
install: dont duplicate imports
Do not add import line if already present
Diffstat (limited to 'install')
| -rwxr-xr-x | install/firefox.fish | 3 |
1 files changed, 2 insertions, 1 deletions
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 |