Moved scripts

This commit is contained in:
Brandon Rozek 2023-01-05 01:01:55 -05:00
parent 8a2c03a69b
commit 15c038f9ff
No known key found for this signature in database
GPG key ID: 26E457DA82C9F480
5 changed files with 0 additions and 0 deletions

24
scripts/getWPT.sh Executable file
View file

@ -0,0 +1,24 @@
#!/bin/sh
set -o errexit
set -o nounset
set -o pipefail
show_usage() {
echo "Usage: getWPT.sh [imagefile] [?name]"
exit 1
}
# Check argument count
if [ "$#" -ne 1 ]; then
show_usage
fi
getLLA="$(dirname $0)/getLLA.sh"
LLA=$("$getLLA" "$1" | tr " " "\n")
IMAGE_NAME="<img src="$(basename "$1")"/>"
NAME_ARG=${2-""}
NAME=$([ "$NAME_ARG" != "" ] && echo "$NAME_ARG" || echo "$IMAGE_NAME")
echo -e "$LLA\n$NAME" | xargs -d "\n" $(dirname $0)/LLA2WPT.sh