Changeset 6c8095a for BLFS/libs/func_dependencies
- Timestamp:
- 08/22/2017 09:00:49 AM (7 years ago)
- Branches:
- ablfs-more, legacy, trunk
- Children:
- e674994
- Parents:
- ca37fee
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/libs/func_dependencies
rca37fee r6c8095a 277 277 local file=$1 278 278 local f 279 local -arootlink279 local rootlink 280 280 local rootlink2 281 281 282 282 #echo file=$file 283 rootlink= ($(head -n1 $file))283 rootlink="$(head -n1 $file) " 284 284 for f in $(grep '[^0-9 ]' $file | sed 's/.* //'); do 285 # echo " f"=$f286 285 if [ -f ${f}.dep ]; then 287 286 rootlink2="$(head -n1 ${f}.dep) " 287 # We want two things: 288 # i) do not erase the file if it is in another branch 289 # ii) do not erase the file if there is a circular dependency 290 # for case i), we test that rootlink is contained in rootlink2 291 # for case ii), we test that rootlink2 is not contained in 292 # rootlink. 288 293 # See comment above about srootlink 289 if [[ ${rootlink2#"${rootlink[*]} "} != ${rootlink2} ]] ; then 294 if [[ ${rootlink2#${rootlink}} != ${rootlink2} && 295 ${rootlink#${rootlink2}} == ${rootlink} ]] ; then 290 296 tree_erase ${f}.dep 291 297 fi
Note:
See TracChangeset
for help on using the changeset viewer.