trouble 😼
This commit is contained in:
parent
afa3a2809d
commit
5ba3a5294c
1 changed files with 5 additions and 4 deletions
9
main.sh
9
main.sh
|
@ -8,16 +8,17 @@
|
||||||
# -p is a path to write the jpg to
|
# -p is a path to write the jpg to
|
||||||
# alternativly you can write the path into PICTURE_PATH
|
# alternativly you can write the path into PICTURE_PATH
|
||||||
set -E -o pipefail
|
set -E -o pipefail
|
||||||
#shopt -s failglob
|
set -x
|
||||||
export LC_ALL='C.UTF8'
|
export LC_ALL='C.UTF8'
|
||||||
|
|
||||||
P_PATH="./label.jpg"
|
export SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
||||||
I_TEXT="$(cat ./text.pango)"
|
|
||||||
|
P_PATH="$SCRIPT_DIR/label.jpg"
|
||||||
|
I_TEXT="$(cat "$SCRIPT_DIR"/text.pango 2>/dev/null || echo 'example text')"
|
||||||
|
|
||||||
P_PATH="${PICTURE_PATH:-$P_PATH}"
|
P_PATH="${PICTURE_PATH:-$P_PATH}"
|
||||||
I_TEXT="${IMAGE_TEXT:-$I_TEXT}"
|
I_TEXT="${IMAGE_TEXT:-$I_TEXT}"
|
||||||
|
|
||||||
|
|
||||||
while getopts "p:t:" opt
|
while getopts "p:t:" opt
|
||||||
do
|
do
|
||||||
case "$opt" in
|
case "$opt" in
|
||||||
|
|
Loading…
Add table
Reference in a new issue