mirror of
https://github.com/Brandon-Rozek/website.git
synced 2024-11-25 09:36:31 -05:00
25 lines
430 B
Bash
25 lines
430 B
Bash
|
#!/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")
|
||
|
IMAGE_NAME=$(basename "$1")
|
||
|
NAME_ARG=${2-""}
|
||
|
NAME=$([ "$NAME_ARG" != "" ] && echo "$NAME_ARG" || echo "$IMAGE_NAME")
|
||
|
|
||
|
echo -e "$LLA\n$NAME" | xargs $(dirname $0)/LLA2WPT.sh
|
||
|
|