2
0

getg729.sh.in 478 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/sh
  2. TAR=@TAR@
  3. ZCAT=@ZCAT@
  4. WGET=@WGET@
  5. CURL=@CURL@
  6. if [ -f "$WGET" ] ; then
  7. DOWNLOAD_CMD=$WGET
  8. else
  9. if [ -f "$CURL" ] ; then
  10. DOWNLOAD_CMD="$CURL -L -O"
  11. fi
  12. fi
  13. base=http://files.freeswitch.org/g729/
  14. tarfile=$1
  15. url=`echo $tarfile | grep "://"`
  16. if [ ! -z $url ] ; then
  17. base=$tarfile/
  18. tarfile=$2
  19. fi
  20. if [ ! -f $tarfile ] ; then
  21. $DOWNLOAD_CMD $base$tarfile
  22. if [ ! -f $tarfile ] ; then
  23. echo cannot find $tarfile
  24. exit 1
  25. fi
  26. fi
  27. exit 0