Debian Codegraph @

cmake/templates/dolfin-get-demos.in

raw
1 #!/bin/bash
2 #
3 # Utility script for installing demos in user's home directory
4
5 DEMO_DIR=@CMAKE_INSTALL_PREFIX@/@DOLFIN_SHARE_DIR@/demo
6 INSTALL_DIR=$HOME/dolfin-demos
7 URL="http://fenicsproject.org/documentation/doc_"`echo @DOLFIN_VERSION@ | cut -d'+' -f1`".html"
8
9 echo "This script will install the DOLFIN demos in your home directory:"
10 echo
11 echo " $INSTALL_DIR"
12 echo
13 echo -n "Do you want to install the DOLFIN demos in your home directory? [y] "
14 read answer
15
16 if [[ $answer == "y" || $answer == "" ]]; then
17 echo "Installing demos..."
18 cp -r $DEMO_DIR $INSTALL_DIR
19 echo
20 echo "The demos have now been installed in $INSTALL_DIR."
21 echo
22 echo "-------------------------------------------------------------------------------"
23 echo "To get started, enter the following command:"
24 echo
25 echo " cd $INSTALL_DIR/pde"
26 echo
27 echo "The documentation can be found at the following address:"
28 echo
29 echo " $URL"
30 echo "-------------------------------------------------------------------------------"
31 echo
32 else
33 echo "ok, demos not installed"
34 fi