mirror of
https://github.com/caelestia-dots/cli.git
synced 2026-06-05 14:59:29 -05:00
install: dont duplicate imports
Do not add import line if already present
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user