Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nptool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
np
nptool
Commits
b87563b0
Commit
b87563b0
authored
11 years ago
by
adrien-matta
Browse files
Options
Downloads
Patches
Plain Diff
* 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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
NPLib/scripts/buildliblist.sh
+12
-16
12 additions, 16 deletions
NPLib/scripts/buildliblist.sh
NPLib/scripts/makefile.sh
+4
-4
4 additions, 4 deletions
NPLib/scripts/makefile.sh
NPLib/scripts/makefile_detector.sh
+6
-6
6 additions, 6 deletions
NPLib/scripts/makefile_detector.sh
with
22 additions
and
26 deletions
NPLib/scripts/buildliblist.sh
+
12
−
16
View file @
b87563b0
...
...
@@ -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
"
\0
11
$name
"
)
echo
"
\0
11
$name
"
>>
$outfile
name
=
$(
printf
$name
|
sed
-e
"s/lib
\/
lib/-l/g"
)
printf
"
$name
"
>>
$outfile
fi
;
done
This diff is collapsed.
Click to expand it.
NPLib/scripts/makefile.sh
+
4
−
4
View file @
b87563b0
...
...
@@ -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
"\011
Entering $name directory..."
printf
"\t
Entering $name directory...
\n
"
# add "-C ./" pattern at the beginning of the name
cmd
=
"-C ./
$name
"
# execute make command with target specified on command line
...
...
This diff is collapsed.
Click to expand it.
NPLib/scripts/makefile_detector.sh
+
6
−
6
View file @
b87563b0
...
...
@@ -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
"
\t
make --silent -C ./
$1
"
>>
$2
printf
"
\t
make --silent -C ./
$1
"
>>
$2
# copy header files
echo
-e
"
\t
cd
$1
; cp -f *.h ../include"
>>
$2
printf
"
\t
cd
$1
; cp -f *.h ../include"
>>
$2
# remove *Dict header files
echo
-e
"
\t
cd include; rm *Dict.h"
>>
$2
printf
"
\t
cd include; rm *Dict.h"
>>
$2
# copy library files
echo
-e
"
\t
cd
$1
; cp -f *.so ../lib"
>>
$2
printf
"
\t
cd
$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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment