Skip to content

Commit

Permalink
address comments from @akshayc11
Browse files Browse the repository at this point in the history
  • Loading branch information
jtrmal committed Jun 11, 2017
1 parent 794afb8 commit 33065c3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tools/extras/install_mmseg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,21 @@ python setup.py install --prefix `pwd`
## so that should be pretty reliable) and then we work out the location of
## the site-packages directory (typically it would be one level up from
## the location of the mmseg.py file but using find seems more reliable
mmseg_file_lib=$(find ./mmseg-1.3.0/lib/ -type f -name mmseg.py | head -n 1)
mmseg_file_lib64=$(find ./mmseg-1.3.0/lib64/ -type f -name mmseg.py | head -n 1)
if [ -f $mmseg_file_lib ]; then
mmseg_file_lib=$(find ./mmseg-1.3.0/lib/ -type f -name mmseg.py | head -n1)
mmseg_file_lib64=$(find ./mmseg-1.3.0/lib64/ -type f -name mmseg.py | head -n1)
if [ ! -z ${mmseg_file_lib+x} ]; then
lib_dir=./lib/
elif [ -f $mmseg_file_lib64 ]; then
elif [ ! -z ${mmseg_file_lib64+x} ]; then
lib_dir=./lib64/
else
echo >&2 "$0: ERROR: Didn't find ./mmseg-1.3.0/lib/ or ./mmseg-1.3.0/lib64/"
echo >&2 " Perhaps your python or system installs python into a different dir?"
echo >&2 " or some other unknown issues arised - review the script output"
echo >&2 " and try to figure out what went wrong."
echo >&2 " Perhaps your python or system installs python modules into"
echo >&2 " a different dir or some other unknown issues arised. Review the output"
echo >&2 " of the script and try to figure out what went wrong."
exit 1
fi

site_packages_dir=$(cd ./mmseg-1.3.0; find $libdir -name "site-packages" -type d | head -n1)
site_packages_dir=$(cd ./mmseg-1.3.0; find $lib_dir -name "site-packages" -type d | head -n1)
(
echo "export MMSEG=\"$PWD/mmseg-1.3.0\""
echo "export PYTHONPATH=\"\${PYTHONPATH:-}:\$MMSEG/${site_packages_dir}\""
Expand Down

0 comments on commit 33065c3

Please sign in to comment.