File: create_example_script

package info (click to toggle)
iqtree 1.5.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 9,780 kB
  • ctags: 11,529
  • sloc: cpp: 96,162; ansic: 59,874; python: 242; sh: 189; makefile: 45
file content (34 lines) | stat: -rwxr-xr-x 864 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
OUT=example.sh
cat > $OUT <<EOT
#!/bin/sh -e
CURDIR=\`pwd\`
if [ -d /usr/share/doc/iqtree/examples ] ; then
  EXAMPLEDIR=/usr/share/doc/iqtree/examples
else
  EXAMPLEFILE=\`find \$CURDIR -name example.phy | head -n 1\`
  EXAMPLEDIR=\`dirname \$EXAMPLEFILE\`
fi

pkg=iqtree
if [ "\$ADTTMP" = "" ] ; then
  ADTTMP=\`mktemp -d /tmp/\${pkg}-test.XXXXXX\`
fi
cd \$ADTTMP
cp -a \$EXAMPLEDIR/example.phy* \$EXAMPLEDIR/example.nex* .
find . -name "*.gz" -exec gunzip \{\} \;

PATHTOEXE=\`which iqtree\`
if [ "\$PATHTOEXE" = "" ] ; then
  PATHTOEXE=\`find \$CURDIR -name iqtree -type f -executable\`
fi
#if [ "\$PATHTOEXE" = "" ] ; then
#  PATHTOEXE=\`find \$CURDIR -name iqtree -type l\`
#fi
echo "Executing tests using \$PATHTOEXE ..."
EOT

grep example.phy iqtree-manual-1.0.tex | \
   grep '^ *iqtree' | \
   sed "s?^ *iqtree?time \$PATHTOEXE?" \
  >> ${OUT}