commit fc72e95499f99e068bbad1ca288cc44ebfbf6847 parent 5df132ad8a2880ff02e268160080cf660b851bb8 Author: parazyd <parazyd@dyne.org> Date: Wed, 6 May 2020 14:07:34 +0200 Add tools for path manipulation. Diffstat:
A | tools/getfonts | | | 4 | ++++ |
A | tools/prettyname | | | 8 | ++++++++ |
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/tools/getfonts b/tools/getfonts @@ -0,0 +1,4 @@ +#!/bin/sh +for i in $(find "$1" -mindepth 1 -maxdepth 1 -type d); do + printf "media-fonts/%s\n" "$(basename "$i")" +done diff --git a/tools/prettyname b/tools/prettyname @@ -0,0 +1,8 @@ +#!/bin/sh +if ! [ -f "$1/METADATA.pb" ]; then + echo "$(basename "$1")" + exit 0 +fi + +awk -F ': ' '/^name: / {print $2}' "$1/METADATA.pb" \ + | tr -d '"' | tr ' ' '+'