source: install/g2full/g2postinstall.sh.template

Last change on this file was 5458, checked in by toby, 5 months ago

put things back

File size: 2.3 KB
Line 
1#!/bin/bash
2echo "Finish up GSAS-II installation, version **Version**"
3# create shortcut to bootstrap script =======================================================
4echo "# Commands to run GSAS-II load/update process" > $PREFIX/start_G2_bootstrap.sh
5echo "source $PREFIX/bin/activate" >> $PREFIX/start_G2_bootstrap.sh
6echo "$PREFIX/bin/python $PREFIX/GSASII/bootstrap.py" >> $PREFIX/start_G2_bootstrap.sh
7# constructor fixups: missing empty directories & changed binary files ======================
8if [[ (! -d $PREFIX/GSASII/.svn/tmp) ]]
9then
10    mkdir -p $PREFIX/GSASII/.svn/tmp
11fi
12
13if [[ -f $PREFIX/bin/svn ]]
14then
15    echo "revert with conda svn"
16    $PREFIX/bin/svn revert -R $PREFIX/GSASII
17elif [[ -f $PREFIX/GSASII/svn/bin/svn ]]
18then
19    echo "upgrade/revert with GSASII svn"
20    $PREFIX/GSASII/svn/bin/svn revert -R $PREFIX/GSASII
21else
22    echo "upgrade/revert with path svn"
23    svn revert -R $PREFIX/GSASII
24fi
25
26# make conda-forge the first place searched in conda operations
27# removed to see if write_condarc option takes care of this.
28#echo "channels:" > $PREFIX/.condarc
29#echo " - conda-forge" >> $PREFIX/.condarc
30#echo " - defaults" >> $PREFIX/.condarc
31#echo "channel_priority: true" >> $PREFIX/.condarc
32#
33# update the GSAS-II package if possible, create shortcuts & byte-compile... ================
34echo "launching bootstrap process"
35# try to update to latest GSAS-II version (will fail if no network)
36#$PREFIX/bin/python $PREFIX/GSASII/bootstrap.py --noinstall >> $PREFIX/GSASII/conda_inst.log 2>&1
37 $PREFIX/bin/python $PREFIX/GSASII/bootstrap.py --noinstall
38# finish installation
39#$PREFIX/bin/python $PREFIX/GSASII/bootstrap.py --nonet > $PREFIX/GSASII/conda_inst.log 2>&1
40 $PREFIX/bin/python $PREFIX/GSASII/bootstrap.py --nonet
41# create shortcut to start GSAS-II     =======================================================
42echo "# Commands to start GSAS-II" > $PREFIX/start_GSASII.sh
43echo "source $PREFIX/bin/activate" >> $PREFIX/start_GSASII.sh
44if [ -e $PREFIX/bin/pythonw ]
45then
46   echo "$PREFIX/bin/pythonw $PREFIX/GSASII/GSASII.py" >> $PREFIX/start_GSASII.sh
47else
48   echo "$PREFIX/bin/python $PREFIX/GSASII/GSASII.py" >> $PREFIX/start_GSASII.sh
49fi
50echo "GSAS-II installer, version **Version** completed"
51#MACOnly# echo "*** Viewing GSAS-II app in Finder; you may wish to drag it to the dock.***"
Note: See TracBrowser for help on using the repository browser.