X-Git-Url: https://git.gag.com/?p=debian%2Fsplat;a=blobdiff_plain;f=utils%2Finstall;fp=utils%2Finstall;h=bdceaf11881fa5dd5f7498c44cc777f1db420213;hp=425770f195a97dcf483cc853ff21b989afa550aa;hb=68a3cad00312b42922f10cc4822349802f50ed20;hpb=0fe7930a10436ce250cae6daf2077415f8727af6 diff --git a/utils/install b/utils/install index 425770f..bdceaf1 100755 --- a/utils/install +++ b/utils/install @@ -1,7 +1,7 @@ #!/bin/bash # # Simple shell script for installing SPLAT! and associated utilities. -# Written by John A. Magliacane, KD2BD April 2002. Updated February 2006. +# Written by John A. Magliacane, KD2BD April 2002. Updated March 2009. # install_citydecoder() @@ -19,7 +19,9 @@ install_usgs2sdf() install_srtm2sdf() { cp srtm2sdf /usr/local/bin - echo "srtm2sdf installed!" + rm -f /usr/local/bin/srtm2sdf-hd + ln -s /usr/local/bin/srtm2sdf /usr/local/bin/srtm2sdf-hd + echo "srtm2sdf and srtm2sdf-hd installed!" } install_fontdata() @@ -30,31 +32,31 @@ install_fontdata() whoami=`whoami` -if [ $whoami != "root" ]; then +if [ "$whoami" != "root" ]; then echo "Sorry, $whoami. You need to be 'root' to install this software. :-(" fi -if [ $# == "0" ]; then +if [ "$#" = "0" ]; then echo "Usage: ./install { citydecoder, srtm2sdf, usgs2sdf, fontdata, all }" else - if [ $1 == "citydecoder" ] && [ $whoami == "root" ] && [ -x citydecoder ]; then + if [ "$1" = "citydecoder" ] && [ "$whoami" = "root" ] && [ -x citydecoder ]; then install_citydecoder fi - if [ $1 == "srtm2sdf" ] && [ $whoami == "root" ] && [ -x srtm2sdf ]; then + if [ "$1" = "srtm2sdf" ] && [ "$whoami" = "root" ] && [ -x srtm2sdf ]; then install_srtm2sdf fi - if [ $1 == "usgs2sdf" ] && [ $whoami == "root" ] && [ -x usgs2sdf ]; then + if [ "$1" = "usgs2sdf" ] && [ "$whoami" = "root" ] && [ -x usgs2sdf ]; then install_usgs2sdf fi - if [ $1 == "fontdata" ] && [ $whoami == "root" ] && [ -x fontdata ]; then + if [ "$1" = "fontdata" ] && [ "$whoami" = "root" ] && [ -x fontdata ]; then install_fontdata fi - if [ $1 == "all" ] && [ $whoami == "root" ]; then + if [ "$1" = "all" ] && [ "$whoami" = "root" ]; then if [ -x citydecoder ]; then install_citydecoder fi @@ -72,7 +74,7 @@ else fi fi - if [ $1 != "citydecoder" ] && [ $1 != "srtm2sdf" ] && [ $1 != "usgs2sdf" ] && [ $1 != "fontdata" ] && [ $1 != "all" ]; then + if [ "$1" != "citydecoder" ] && [ "$1" != "srtm2sdf" ] && [ "$1" != "usgs2sdf" ] && [ "$1" != "fontdata" ] && [ "$1" != "all" ]; then echo "Usage: install { citydecoder, srtm2sdf, usgs2sdf, fontdata, all }" fi fi