From f6e82566f2d1c4755373824406858fd08d89d6ca Mon Sep 17 00:00:00 2001 From: Andrey Miroshnikov Date: Mon, 25 Jul 2022 16:41:58 +0100 Subject: [PATCH] tasyagle-install: Added check with .bashrc, commented out doc generation --- tasyagle-install | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tasyagle-install b/tasyagle-install index af3cd15..97a5f63 100755 --- a/tasyagle-install +++ b/tasyagle-install @@ -24,12 +24,24 @@ cd /home/$SUDO_USER/src chown -R $SUDO_USER . chgrp -R $SUDO_USER . -echo "Adding avt_env.sh to .bashrc" -echo "source /usr/local/avt_env.sh" >> /home/$SUDO_USER/.bashrc +STRING="source /usr/local/avt_env.sh" +if grep -q "$STRING" /home/$SUDO_USER/.bashrc ; then + echo 'avt_env.sh already in .bashrc' +else + echo 'Adding avt_env.sh to .bashrc' + echo "$STRING" >> /home/$SUDO_USER/.bashrc + chown -R $SUDO_USER /home/$SUDO_USER/.bashrc + chgrp -R $SUDO_USER /home/$SUDO_USER/.bashrc +fi + # Compile the documentation -cd tas-yagle/distrib/docxml2 -make +# source the file, otherwise can't compile docs... +# TODO: source doesn't work within script, do manually as normal user +# for now +#source /home/$SUDO_USER/.bashrc +#cd tas-yagle/distrib/docxml2 +#make cd /home/$SUDO_USER/src chown -R $SUDO_USER . -- 2.30.2