Prise en compte d'un argument positionnel pour restreindre la recherche des programmes à compiler à un répertoire
This commit is contained in:
parent
08eef1bb14
commit
99de52f66b
|
@ -4,8 +4,14 @@ function path_to_name {
|
||||||
PROGRAMPATH=$1
|
PROGRAMPATH=$1
|
||||||
echo ${PROGRAMPATH//\_/\ }
|
echo ${PROGRAMPATH//\_/\ }
|
||||||
}
|
}
|
||||||
|
if [ "$1" = '' ]
|
||||||
|
then
|
||||||
|
rep='.'
|
||||||
|
else
|
||||||
|
rep="$1"
|
||||||
|
fi
|
||||||
|
|
||||||
for directory in $(find . -name programme -type d); do
|
for directory in $(find "$rep" -name programme -type d); do
|
||||||
cat > programme_options.tex <<EOB
|
cat > programme_options.tex <<EOB
|
||||||
\\newcommand{\\formation}{$(path_to_name $(basename ${directory%/programme}))}
|
\\newcommand{\\formation}{$(path_to_name $(basename ${directory%/programme}))}
|
||||||
\\newcommand{\\dossier}{$directory}
|
\\newcommand{\\dossier}{$directory}
|
||||||
|
|
Loading…
Reference in New Issue