move-gbench.sh
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:2k
源码类别:

生物技术

开发平台:

C/C++

  1. #!/bin/sh
  2. # $Id: move-gbench.sh,v 1000.1 2004/04/12 19:07:58 gouriano Exp $
  3. install_dir=`dirname $0`
  4. extra_sed=
  5. if test "x$1" = "x--extra-sed"; then
  6.     extra_sed=$2
  7.     shift
  8.     shift
  9. fi
  10. if [ ! -z "$1" ]
  11. then
  12.     dir=$1
  13.     test -f "$dir/run-gbench.sh" || dir=`echo "$1" | sed "s,/bin$,,"`
  14. else
  15.     dir=`echo "$install_dir" | sed "s,/bin$,,"`
  16. fi
  17. sedscript="s%/netopt/ncbi_tools.[^/ ]*%/netopt/ncbi_tools%g"
  18. test -n "$extra_sed"  &&  sedscript="$sedscript; $extra_sed"
  19. dir=`echo $dir | sed "$sedscript"`
  20. echo "Preparing Genome Workbench installation for move to path $dir"
  21. sed "s,^NCBI_GBENCH_INSTALL_DIR=.*,NCBI_GBENCH_INSTALL_DIR=$dir," $install_dir/run-gbench.sh > $install_dir/run-gbench.sh.$$
  22. mv -f $install_dir/run-gbench.sh.$$ $install_dir/run-gbench.sh
  23. chmod 755 $install_dir/run-gbench.sh
  24. for ftype in auto asntext asnbin xml fasta newick textalign; do
  25.  sed "s,^NCBI_GBENCH_INSTALL_DIR=.*,NCBI_GBENCH_INSTALL_DIR=$dir," $install_dir/gbench_remote_template.sh | sed "s,^file_type=.*,file_type=$ftype," > $install_dir/gbench_remote_$ftype
  26.  chmod 755 $install_dir/gbench_remote_$ftype
  27.  sed "s,^NCBI_GBENCH_INSTALL_DIR=.*,NCBI_GBENCH_INSTALL_DIR=$dir," $install_dir/gbench_noremote_template.sh | sed "s,^file_type=.*,file_type=$ftype," > $install_dir/gbench_noremote_$ftype
  28.  chmod 755 $install_dir/gbench_noremote_$ftype
  29. done
  30. #  ===========================================================================
  31. #  PRODUCTION $Log: move-gbench.sh,v $
  32. #  PRODUCTION Revision 1000.1  2004/04/12 19:07:58  gouriano
  33. #  PRODUCTION PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.10
  34. #  PRODUCTION
  35. #  ===========================================================================