4 then echo "Please run as root"
8 apt-get
install -y quilt tcsh swig libedit-dev tcl8.6
-dev \
9 libmotif-dev libxpa1 libxt-dev libxpm-dev \
10 default-jre-headless default-jdk-headless \
11 libncurses5 libedit-dev \
12 libsaxon-java libsaxonb-java libservlet3.1
-java fop\
15 # Make sure to use the flex included with tasyagle
18 mkdir
-p /home
/$SUDO_USER/src
19 cd /home
/$SUDO_USER/src
20 git clone https
://git.libre-soc.org
/git
/tas-yagle.git
23 # Specify installation dir
24 installDir
="/usr/local" .
/build.sh
26 cd /home
/$SUDO_USER/src
30 STRING
="source /usr/local/avt_env.sh"
31 if grep -q "$STRING" /home
/$SUDO_USER/.bashrc
; then
32 echo 'avt_env.sh already in .bashrc'
34 # Default .bashrc usually has a check if shell is
35 # interactive, so adding at the start is a workaround
36 echo 'Adding avt_env.sh to .bashrc'
37 sed -i "1i $STRING" /home
/$SUDO_USER/.bashrc
38 chown
-R $SUDO_USER /home
/$SUDO_USER/.bashrc
39 chgrp
-R $SUDO_USER /home
/$SUDO_USER/.bashrc
42 # Compile the documentation and example
43 echo "Entering bash as $SUDO_USER to reload .bashrc and compile docs!"
44 runuser
$SUDO_USER -c "/bin/bash << EOF
46 cd /home/$SUDO_USER/src/tas-yagle/distrib/docxml2
48 cd /home/$SUDO_USER/src/tas-yagle/distrib/share/tutorials/hitas/inv
52 echo "Finished tas-yagle compilation, make sure to source .bashrc!"