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 ...@@ -41,6 +41,10 @@ if [[ $1 = clean ]]; then
echo "* Cleaning last METro model build attempt if necessary..." echo "* Cleaning last METro model build attempt if necessary..."
rm -f _macadam.so *.o macadam.py macadam_wrap.c rm -f _macadam.so *.o macadam.py macadam_wrap.c
exit 0 exit 0
elif [[ $1 = "" ]]; then
destination_path="../.."
else
destination_path=$1
fi fi
# SETUP TRAP # SETUP TRAP
...@@ -114,10 +118,15 @@ $FC -shared macadam.o macadam_wrap.o lib_gen.o grille.o array2matrix.o initial ...@@ -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" echo " Copying .so in usr/share/metro/model"
if [ ! -d ../../usr/share/metro/model ]; then if [ ! -d $destination_path/usr/share/metro/model ]; then
mkdir ../../usr/share/metro/model 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 fi
cp _macadam.so ../../usr/lib/metro/ cp _macadam.so $destination_path/usr/lib/metro/
cp macadam.py ../../usr/share/metro/model/
#cp -v _macadam.so macadam.py ../frontend/model/ #cp -v _macadam.so macadam.py ../frontend/model/
...@@ -154,7 +154,7 @@ if [ $bCompile == 1 ]; then ...@@ -154,7 +154,7 @@ if [ $bCompile == 1 ]; then
fi fi
cd src/model cd src/model
../../scripts/do_macadam clean ../../scripts/do_macadam clean
../../scripts/do_macadam ../../scripts/do_macadam $destination_path
cd $installation_dir cd $installation_dir
#else #else
# echo "* Use provided binary for physic model" # echo "* Use provided binary for physic model"
...@@ -193,8 +193,9 @@ cp $sVerbose -r src/frontend/toolbox $destination_path/usr/share/metro ...@@ -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 # cp $sVerbose src/model/_macadam.so.prebuilt $destination_path/usr/lib/metro/_macadam.so
#fi #fi
mkdir -p $destination_path/usr/share/doc/metro/
echo "* Copying METRo doc files to: "$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 echo "* Creating METRo log directory: "$destination_path/var/log
mkdir -p $destination_path/var/log mkdir -p $destination_path/var/log
...@@ -202,6 +203,7 @@ mkdir -p $destination_path/var/log ...@@ -202,6 +203,7 @@ mkdir -p $destination_path/var/log
cd $installation_dir cd $installation_dir
mkdir -p $destination_path/usr/bin
echo "* Make link to METRo executable:" echo "* Make link to METRo executable:"
echo " $destination_path/usr/bin/metro -> $destination_path/usr/share/metro/metro.py" echo " $destination_path/usr/bin/metro -> $destination_path/usr/share/metro/metro.py"
ln -sf ../share/metro/metro.py $destination_path/usr/bin/metro 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