Commit aca070ed authored by François Fortin's avatar François Fortin
Browse files

Fix setup.sh and do_macadam with fix sent by Vyacheslav Lukin

parent d8baaabd
......@@ -41,6 +41,10 @@ if [[ $1 = clean ]]; then
echo "* Cleaning last METro model build attempt if necessary..."
rm -f _macadam.so *.o macadam.py macadam_wrap.c
exit 0
elif [[ $1 = "" ]]; then
destination_path="../.."
else
destination_path=$1
fi
# SETUP TRAP
......@@ -114,10 +118,15 @@ $FC -shared macadam.o macadam_wrap.o lib_gen.o grille.o array2matrix.o initial
echo " Copying .so in usr/share/metro/model"
if [ ! -d ../../usr/share/metro/model ]; then
mkdir ../../usr/share/metro/model
if [ ! -d $destination_path/usr/share/metro/model ]; then
mkdir $destination_path/usr/share/metro/model
fi
cp macadam.py $destination_path/usr/share/metro/model/
if [ ! -d $destination_path/usr/lib/metro ]; then
mkdir -p $destination_path/usr/lib/metro
fi
cp _macadam.so ../../usr/lib/metro/
cp macadam.py ../../usr/share/metro/model/
cp _macadam.so $destination_path/usr/lib/metro/
#cp -v _macadam.so macadam.py ../frontend/model/
......@@ -154,7 +154,7 @@ if [ $bCompile == 1 ]; then
fi
cd src/model
../../scripts/do_macadam clean
../../scripts/do_macadam
../../scripts/do_macadam $destination_path
cd $installation_dir
#else
# echo "* Use provided binary for physic model"
......@@ -193,8 +193,9 @@ cp $sVerbose -r src/frontend/toolbox $destination_path/usr/share/metro
# cp $sVerbose src/model/_macadam.so.prebuilt $destination_path/usr/lib/metro/_macadam.so
#fi
mkdir -p $destination_path/usr/share/doc/metro/
echo "* Copying METRo doc files to: "$destination_path/usr/share/doc/metro/
cp $sVerbose INSTALL LICENSE README $destination_path/usr/share/doc/metro/
cp $sVerbose INSTALL LICENSE README.md README.devel $destination_path/usr/share/doc/metro/
echo "* Creating METRo log directory: "$destination_path/var/log
mkdir -p $destination_path/var/log
......@@ -202,6 +203,7 @@ mkdir -p $destination_path/var/log
cd $installation_dir
mkdir -p $destination_path/usr/bin
echo "* Make link to METRo executable:"
echo " $destination_path/usr/bin/metro -> $destination_path/usr/share/metro/metro.py"
ln -sf ../share/metro/metro.py $destination_path/usr/bin/metro
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment