Skip to content
Snippets Groups Projects
Commit 3f63cedd authored by Yoann Guilhem's avatar Yoann Guilhem Committed by Nicola Vigano
Browse files

Fix DCTuser_setup.sh:

- create ~/.subversion directory in case of first use of SVN
- add the line in .bashrc to source bashrc_private (for new ESRF users, this line is not present)

git-svn-id: https://svn.code.sf.net/p/dct/code/trunk@479 4c865b51-4357-4376-afb4-474e03ccb993
parent f62f372e
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,7 @@ DCT_DIR="${HOME}/matlabDCT" ...@@ -5,6 +5,7 @@ DCT_DIR="${HOME}/matlabDCT"
CURRENT_DIR=`pwd` CURRENT_DIR=`pwd`
# get a good version of .subversion/servers # get a good version of .subversion/servers
mkdir -p ${HOME}/.subversion
echo "Setup SVN servers..." echo "Setup SVN servers..."
echo "http-proxy-host = proxy.esrf.fr echo "http-proxy-host = proxy.esrf.fr
http-proxy-port = 3128 http-proxy-port = 3128
...@@ -14,6 +15,18 @@ store-plaintext-passwords = no" >> ${HOME}/.subversion/servers ...@@ -14,6 +15,18 @@ store-plaintext-passwords = no" >> ${HOME}/.subversion/servers
echo "Checkout code from Sourceforge, in directory \"${DCT_DIR}\"..." echo "Checkout code from Sourceforge, in directory \"${DCT_DIR}\"..."
svn co https://dct.svn.sourceforge.net/svnroot/dct/trunk ${DCT_DIR} svn co https://dct.svn.sourceforge.net/svnroot/dct/trunk ${DCT_DIR}
# check if .bashrc_private is sourced by .bashrc, if not, add it
if ! grep -qE '^\s*[^#].+\. ~/.bashrc_private' ~/.bashrc ; then
echo "Adding line in in .bashrc file to source .bashrc_private file"
if [ -w ~/.bashrc ] ; then
echo -e '\n[ -f ~/.bashrc_private ] && . ~/.bashrc_private' >> ~/.bashrc
else
echo "The .bashrc file is not writable, so adding writable bit before!"
chmod +w ~/.bashrc
echo -e '\n[ -f ~/.bashrc_private ] && . ~/.bashrc_private' >> ~/.bashrc
chmod -w ~/.bashrc
fi
fi
# append to .bashrc_private # append to .bashrc_private
echo "Appending to your .bashrc_private file..." echo "Appending to your .bashrc_private file..."
echo " echo "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment