mirror of
https://github.com/Brandon-Rozek/website.git
synced 2025-10-10 06:51:13 +00:00
Moved scripts
This commit is contained in:
parent
8a2c03a69b
commit
15c038f9ff
5 changed files with 0 additions and 0 deletions
27
scripts/LLA2WPT.sh
Executable file
27
scripts/LLA2WPT.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
show_usage() {
|
||||
echo "Usage: LLA2WPT.sh [LAT] [LON] [ALT] [?NAME]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Check argument count
|
||||
if [ "$#" -ne 3 ] | [ "$#" -ne 4 ]; then
|
||||
show_usage
|
||||
fi
|
||||
|
||||
|
||||
LAT="$1"
|
||||
LON="$2"
|
||||
ALT="$3"
|
||||
NAME=${4-""}
|
||||
|
||||
echo "<wpt lat=\"$LAT\" lon=\"$LON\">"
|
||||
echo -e "\t<ele>$ALT</ele>"
|
||||
echo -e "\t<name>$4</name>"
|
||||
echo "</wpt>"
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue