28 lines
508 B
Bash
Executable File
28 lines
508 B
Bash
Executable File
#!/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"
|