|
123456789101112131415161718192021222324252627 |
- #!/bin/bash
- # Создать файл JavaScript с набором иконок в формате Base64.
-
- function gen
- {
- name=$1
- fileName=$2
- target=$3
-
- echo -n "'$name' : '" >> $target
- base64 $fileName | tr -d \\n >> $target
- echo -e "',\n" >> $target
- }
-
- function genIcons
- {
- target=$1
-
- echo -e "function RR() { return {\n" > $target
-
- gen "layout" "boxes-solid.svg" $target
- gen "info" "info-solid.svg" $target
-
- echo "}; }" >> $target
- }
-
- genIcons "../2019-09-12.js"
|