Created
May 25, 2017 20:56
-
-
Save Sammers21/82f32b22e9498dfdf1ce3db72d710fb9 to your computer and use it in GitHub Desktop.
Штука которая берет все .gv файлы в директории и делает из них .png файлы.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function transform(){ | |
for file in "$(ls $1 | grep .gv)" | |
do | |
ofile=${file::-3} | |
dot -Tpng "$file" -o "$ofile.png" | |
done | |
} | |
if [ -z "$1" ]; then | |
transform . | |
else | |
transform $1 | |
fi | |
# usage kek.sh [path_to_dir] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Для того что бы этот скрипт работал нужно установить graphviz.
Для ubuntu это можно с помощью sudo apt install graphviz