Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
xdg
shared-mime-info
Commits
b1662f0c
Commit
b1662f0c
authored
Feb 20, 2020
by
Salamandar
Committed by
Bastien Nocera
Feb 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: Add script that prints stats on generic icons
Replaces the shell in Makefile.am
parent
515a8db5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
Makefile.am
Makefile.am
+3
-3
tests/test_generic_icons.sh
tests/test_generic_icons.sh
+14
-0
No files found.
Makefile.am
View file @
b1662f0c
...
...
@@ -37,7 +37,8 @@ EXTRA_DIST = \
$(ITS_FILES)
\
shared-mime-info.pc.in
\
data/freedesktop_generate.sh
\
po/check_translations.sh
po/check_translations.sh
\
tests/test_generic_icons.sh
CLEANFILES
=
freedesktop.org.xml po/stamp-it
...
...
@@ -133,8 +134,7 @@ else
echo
"*************************************************************"
;
\
exit
1
;
\
fi
@
echo
Number of mime-types that might need generic-icon:
`
grep
"mime-type type="
$(srcdir)
/data/freedesktop.org.xml.in |
grep
-v
video/ |
grep
-v
image/ |
grep
-v
text/ |
grep
-v
audio/ |
grep
-v
"octet-stream"
|
wc
-l
`
;
\
echo
Number of mime-types with a generic icon:
`
grep
"generic-icon name="
$(srcdir)
/data/freedesktop.org.xml.in |
wc
-l
`
;
@
$(srcdir)
/tests/test_generic_icons.sh
$(srcdir)
/data/freedesktop.org.xml.in
endif
check-translations
:
...
...
tests/test_generic_icons.sh
0 → 100755
View file @
b1662f0c
#!/usr/bin/env bash
xml_db_file
=
"
${
1
}
"
generic_icons_required
=
$(
grep
"mime-type type="
"
${
xml_db_file
}
"
\
|
grep
-cv
'video/|image/|text/|audio/|octet-stream'
)
generic_icons_present
=
$(
grep
-c
"generic-icon name="
"
${
xml_db_file
}
"
)
echo
"Number of mime-types that might need generic-icon:
${
generic_icons_required
}
"
echo
"Number of mime-types with a generic icon:
${
generic_icons_present
}
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment