#2689 closed Defect (fixed)
latest Fmake_WORK.sh changes assume ln understands the -r option
Reported by: | acc | Owned by: | acc |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | tools | Version: | trunk |
Severity: | minor | Keywords: | |
Cc: |
Description (last modified by acc)
Context
Recent improvements to correctly enable the specification and use of alternative MY_SRC directories may break on some systems.
Analysis
The cause is the use of ln -r to create links relative to the current directory. This option is not understood by all versions of ln.
Recommendation
It will be more robust to be set the links explicitly. This works:
-
Fmake_WORK.sh
82 82 ln -sf ${ZDIR}/*.[Ffh]90 ${ZCONF}/WORK/. 83 83 echo ${ZDIR}' content is linked to '${ZCONF}/WORK 84 84 elif [ -d ${ZCONF}/${ZDIR} ] ; then 85 ln -rsf ${ZCONF}/${ZDIR}/*.[Ffh]90 ${ZCONF}/WORK/. 86 echo ${ZDIR}' content is linked to '${ZCONF}/WORK 85 for ff in ${ZCONF}/${ZDIR}/*.[Ffh]90 86 do 87 f=`basename $ff` 88 ln -sf ../${ZDIR}/$f ${ZCONF}/WORK/. 89 done 90 echo ${ZCONF}/${ZDIR}' content is linked to '${ZCONF}/WORK 87 91 else 88 ln -rsf ${ZCONF}/MY_SRC/*.[Ffh]90 ${ZCONF}/WORK/. 89 echo 'External directory for MY_SRC does not exist. Using default.' 90 echo 'MY_SRC content is linked to '${ZCONF}/WORK 92 for ff in ${ZCONF}/MY_SRC/*.[Ffh]90 93 do 94 f=`basename $ff` 95 ln -sf ../MY_SRC/$f ${ZCONF}/WORK/. 96 done 97 echo 'External directory for MY_SRC unspecified or does not exist. Using default.' 98 echo ${ZCONF}/MY_SRC' content is linked to '${ZCONF}/WORK 91 99 fi 92 100 done
and will be submitted later if no one has a better idea.
Commit History (2)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
15186 | gsamson | 2021-08-12T18:39:09+02:00 | simplify commit done at r14979 (#2689) and restore MY_SRC subdir links introduced at r13528 |
14979 | acc | 2021-06-11T15:25:26+02:00 | #2689 . Replace use of ln -r in Fmake_WORK.sh with a POSIX2-compliant alternative. No change in behaviour expected but should work on all systems |
Change History (5)
comment:1 Changed 2 years ago by acc
- Description modified (diff)
comment:2 Changed 2 years ago by acc
- Status changed from new to assigned
- Summary changed from lates Fmake_WORK.sh changes assume ln understands the -r option to latest Fmake_WORK.sh changes assume ln understands the -r option
comment:3 Changed 2 years ago by acc
comment:4 Changed 2 years ago by acc
- Resolution set to fixed
- Status changed from assigned to closed
comment:5 Changed 22 months ago by gsamson
In 15186:
In 14979: