author | Olivier Brunel
<jjk@jjacky.com> 2023-07-07 08:21:11 UTC |
committer | Olivier Brunel
<jjk@jjacky.com> 2023-07-07 17:07:37 UTC |
parent | c22a384167f0fd9b42ac0491d7a2c2b833aa9528 |
getdeps | +10 | -1 |
diff --git a/getdeps b/getdeps index b73aae6..a0420a0 100755 --- a/getdeps +++ b/getdeps @@ -81,9 +81,17 @@ getdep() fi else dst="deps" + local libname="$(cat "$dep/library" 2>/dev/null)" + if test -z "$libname"; then libname="$depname"; fi + if test -e "$LIBDIR/lib$libname.so" || test -e "$LIBDIR/lib$libname.a"; then + echo :: $depname found in system, skipping + return + fi fi - echo "getting $depname..." + if ! test -e "deps"; then run mkdir "deps"; fi + echo ":: Getting $depname..." + if test -e "$dst/$depname"; then warn "cannot clone: '$dst/$depname' already exists" else @@ -121,6 +129,7 @@ loaddeps if test $# -eq 0; then usage 0; fi +if test -z "$LIBDIR"; then LIBDIR=/lib; fi isdep=0 dryrun=0 for arg ; do