fix-fomantic-ssh.sh is not portable
When using macOS, trying to bring up the frontend highlights a problem with the fix-fomantic-css.sh
frontend script.
Output
$ yarn run fix-fomantic-css
yarn run v1.22.17
$ scripts/fix-fomantic-css.sh
++ dirname scripts/fix-fomantic-css.sh
+ cd scripts/..
+ find node_modules/fomantic-ui-css/components -name '*.min.css' -delete
+ mkdir -p node_modules/fomantic-ui-css/tweaked
+ echo 'Removing google font…'
Removing google font…
+ sed -i '/@import url(/d' node_modules/fomantic-ui-css/components/site.css
sed: 1: "node_modules/fomantic-u ...": extra characters at the end of n command
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
This problem is found at https://dev.funkwhale.audio/funkwhale/funkwhale/-/blob/develop/front/scripts/fix-fomantic-css.sh#L8. A hacky workaround is to alter this line as follows:
sed -i.bak '/@import url(/d' node_modules/fomantic-ui-css/components/site.css && rm node_modules/fomantic-ui-css/components/site.css.bak
We need to address the portability of this script.