소스 검색

Support running script from anywhere

References the programs fonts, no matter where the script is run from.
master
Matt Baer 7 년 전
부모
커밋
6ca47e77d9
1개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. +6
    -5
      text-to-image.sh

+ 6
- 5
text-to-image.sh 파일 보기

@@ -45,14 +45,15 @@ esac

echo "Thanks. Generating image..."

font_reg=$HOME/.local/share/fonts/Lora-Regular.ttf
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
font_reg=$DIR/fonts/Lora-Regular.ttf
if [ "$font" = "mono" ]; then
font_reg=$HOME/.local/share/fonts/Hack-Regular.ttf
font_reg=$DIR/fonts/Hack-Regular.ttf
elif [ "$font" != "norm" ]; then
font_reg=$HOME/.local/share/fonts/OpenSans-Regular.ttf
font_reg=$DIR/fonts/OpenSans-Regular.ttf
fi
write_bold=$HOME/.local/share/fonts/Lora-Bold.ttf
write_reg=$HOME/.local/share/fonts/Lora-Regular.ttf
write_bold=$DIR/fonts/Lora-Bold.ttf
write_reg=$DIR/fonts/Lora-Regular.ttf

# Generate post text
if [ $(echo "$msg" | wc -m) -lt 40 ]; then


불러오는 중...
취소
저장