Don't expand symlinks when copying external files

master
Quentin Duchemin 2024-05-14 17:20:58 +02:00
parent 2213088b43
commit c38e3a10b9
2 changed files with 2 additions and 1 deletions

View File

@ -94,6 +94,7 @@ rsync
signal-desktop signal-desktop
stylua stylua
telegram-desktop telegram-desktop
texlive-binextra
tectonic tectonic
terminator terminator
thunderbird thunderbird

View File

@ -185,7 +185,7 @@ for f in `find ${CONFIG} -type f -name ${DEST_FILENAME}`; do
# Get all files, either regular files or symlinks, which are not the destination file nor specific desktop/laptop files # Get all files, either regular files or symlinks, which are not the destination file nor specific desktop/laptop files
# This is because if desktop/laptop files exist, they already have a symlink pointing to them at this stage # This is because if desktop/laptop files exist, they already have a symlink pointing to them at this stage
# We want to get the path relative to the directory we are searching in, so subfolders are kept when copying # We want to get the path relative to the directory we are searching in, so subfolders are kept when copying
for config_file in `find ${DIR} -regextype posix-extended -mindepth 1 \( -type f -o -type l \) -not \( -regex "${ENV_EXT_REGEXP}" -o -name "${DEST_FILENAME}" \) -exec realpath --relative-to ${DIR} {} \;`; do for config_file in `find ${DIR} -regextype posix-extended -mindepth 1 \( -type f -o -type l \) -not \( -regex "${ENV_EXT_REGEXP}" -o -name "${DEST_FILENAME}" \) -exec realpath -s --relative-to ${DIR} {} \;`; do
# If we have to copy to a subfolder, extract it # If we have to copy to a subfolder, extract it
if echo ${config_file} | grep -q '/'; then if echo ${config_file} | grep -q '/'; then
subfolder=${config_file%/*} subfolder=${config_file%/*}