Skip to content
Snippets Groups Projects
Commit b87563b0 authored by adrien-matta's avatar adrien-matta
Browse files

* Replace echo by printf in all the script of NPL to avoid issue with

* unrecognize -e option on various linux platform
parent 84933eab
No related branches found
No related tags found
No related merge requests found
......@@ -27,18 +27,18 @@ echo " + Creating liblist file....."
outfile="liblist"
# if output file exists delete it
if [ -e $outfile ] ; then
rm $outfile
fi ;
#if [ -e $outfile ] ; then
# rm $outfile
#fi ;
# create output file
echo "#! /bin/bash" >> $outfile
echo "#" >> $outfile
echo "# WARNING:" >> $outfile
echo "# This file is automatically generated when NPLib libraries are built through the make command." >> $outfile
echo "# If you modify this file by hand, changes won't persist the next time you compile NPLib." >> $outfile
echo "#" >> $outfile
echo "echo -L$NPTOOL/NPLib/lib \\" >> $outfile
printf "#! /bin/bash\n" > $outfile
printf "#\n" >> $outfile
printf "# WARNING:\n" >> $outfile
printf "# This file is automatically generated when NPLib libraries are built through the make command.\n" >> $outfile
printf "# If you modify this file by hand, changes won't persist the next time you compile NPLib.\n" >> $outfile
printf "#\n" >> $outfile
printf "echo -L$NPTOOL/NPLib/lib" >> $outfile
chmod a+x $outfile
# loop on *.so files in lib/ directory
......@@ -48,11 +48,7 @@ do
# remove .so extension
name=${file%\.*}
# replace "lib/lib" pattern by "-l"
name=$(echo $name | sed -e "s/lib\/lib/-l/g")
# add trailing \
name="$name \\"
# add tab at the beginning
name=$(echo "\011 $name")
echo "\011 $name" >> $outfile
name=$(printf $name | sed -e "s/lib\/lib/-l/g")
printf " $name " >> $outfile
fi ;
done
......@@ -27,9 +27,9 @@
#! /bin/bash
if [ $# = 0 ] ; then
echo " + Building detector libraries....."
printf " + Building detector libraries.....\n"
else
echo " + Cleaning $2 libraries....."
printf " + Cleaning $2 libraries.....\n"
fi ;
# read .detector_libs or .core_libs file created by the configure script
......@@ -47,9 +47,9 @@ do
# file name in lower case
lname=$(echo "$name" | tr '[A-Z]' '[a-z]')
# only build defined detector libraries
if echo "$detectorlibs" | grep -q "$lname" ; then
if printf "$detectorlibs" | grep -q "$lname" ; then
# print informations
echo "\011Entering $name directory..."
printf "\tEntering $name directory...\n"
# add "-C ./" pattern at the beginning of the name
cmd="-C ./$name"
# execute make command with target specified on command line
......
......@@ -28,19 +28,19 @@
# build message
echo -e "\t@echo \"Entering $1 directory...\"" >> $2
printf "\t@echo \"Entering $1 directory...\"" >> $2
# execute make command with target specified on command line
echo -e "\tmake --silent -C ./$1" >> $2
printf "\tmake --silent -C ./$1" >> $2
# copy header files
echo -e "\tcd $1; cp -f *.h ../include" >> $2
printf "\tcd $1; cp -f *.h ../include" >> $2
# remove *Dict header files
echo -e "\tcd include; rm *Dict.h" >> $2
printf "\tcd include; rm *Dict.h" >> $2
# copy library files
echo -e "\tcd $1; cp -f *.so ../lib" >> $2
printf "\tcd $1; cp -f *.so ../lib" >> $2
# deal with mac osx dylib files
#echo "ifeq (\$(findstring macosx, \$(ARCH)), macosx)" >> $2
#echo "\t@echo \"to be done\""
#echo "endif" >> $2
# newline
echo "" >> $2
printf "" >> $2
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