blob: 2b7b35ed2c503737ac713e8e4563dfa71f1cdd55 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/bin/bash
rm ./new/Artboard.svg
for file in ./new/*.svg
do
echo "${file}"
sed -i "" 's/---//g' ${file}
sed -i "" 's/fill="none"//g' ${file}
sed -i "" 's/fill-rule="evenodd"//g' ${file}
sed -i "" 's/stroke-linecap="round"//g' ${file}
sed -i "" 's/stroke-linejoin="round"//g' ${file}
sed -i "" 's/viewBox="0 0 24 24"//g' ${file}
sed -i "" 's/stroke="#000000"//g' ${file}
sed -i "" 's/stroke="#000"//g' ${file}
sed -i "" 's/stroke-width="2"//g' ${file}
sed -i "" 's/width="24"//g' ${file}
sed -i "" 's/width="24px"//g' ${file}
sed -i "" 's/height="24"//g' ${file}
sed -i "" 's/height="24px"//g' ${file}
sed -i "" 's/xmlns="http:\/\/www.w3.org\/2000\/svg"//g' ${file}
sed -i "" 's/<path d="M0 0h24v24H0z"\/>"//g' ${file}
done
svgo -f ./new/ --pretty --disable mergePaths
for file in ./new/*.svg
do
echo "${file}"
sed -i "" -e $'s/<svg>/---\\\n---\\\n<svg>/g' ${file}
done
cp ./new/* ./src/_icons/
|