pkgmeek: dereference symbolic links when populating the src directory

This commit is contained in:
John McQuah 2023-01-14 20:48:00 -05:00
parent d65af7889f
commit b5b9a34a70
1 changed files with 2 additions and 2 deletions

View File

@ -76,7 +76,7 @@ here="${_local_[$u]}"; url="${source[$u]}";
# at least one of the following commands should put a file of the
# appropriate name in the current directory
[ -e "$here" ] || [ "$src_dir" = "" ] || [ ! -e "$src_dir/$here" ] || ln -sf "$src_dir/$here" ;
[ -e "$here" ] || [ ! -e "$PKGMK_ROOT/$here" ] || ln -sf "$PKGMK_ROOT/$here" . ;
[ -e "$here" ] || [ ! -e "$PKGMK_ROOT/$here" ] || ln -sf "$PKGMK_ROOT/$here" ;
[ -e "$here" ] || fetch_url "$url" "$here"; # <-- should also be able to resume partial downloads
[ -e "$here" ] || { error "failed to download $here. Check connection and try again."; errDL+=1; }
done ; }
@ -146,7 +146,7 @@ if [ "$pkg_utd" = 0 ] || [ "$PKGMK_FORCE" = "yes" ]; then
*.tar|*.tar.gz|*.tar.Z|*.tgz|*.tar.bz2|*.tbz2|*.tar.xz|*.txz|*.tar.lzma|*.tar.lz|*.7z|*.zip|*.rpm)
bsdtar -p -o -C src -xf "$here" || errUZ+=1 ;;
*)
cp -r "$here" src/ ;;
cp -r -L "$here" src/ ;;
esac
done