mirror of
https://github.com/Kron4ek/Conty
synced 2024-12-26 09:58:38 +01:00
Fix exporting desktop files which are symlinks
This commit is contained in:
parent
9d8301032c
commit
b09a683ccf
1 changed files with 7 additions and 1 deletions
|
@ -835,7 +835,8 @@ if [ "$(ls "${mount_point}" 2>/dev/null)" ] || \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "${applications_dir}"
|
mkdir -p "${applications_dir}"
|
||||||
cd "${mount_point}"/usr/share/applications || exit 1
|
cp -r "${mount_point}"/usr/share/applications "${applications_dir}"_temp
|
||||||
|
cd "${applications_dir}"_temp || exit 1
|
||||||
|
|
||||||
unset variables
|
unset variables
|
||||||
vars="BASE_DIR DISABLE_NET DISABLE_X11 HOME_DIR SANDBOX SANDBOX_LEVEL USE_SYS_UTILS CUSTOM_MNT"
|
vars="BASE_DIR DISABLE_NET DISABLE_X11 HOME_DIR SANDBOX SANDBOX_LEVEL USE_SYS_UTILS CUSTOM_MNT"
|
||||||
|
@ -858,6 +859,10 @@ if [ "$(ls "${mount_point}" 2>/dev/null)" ] || \
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -L "${f}" ]; then
|
||||||
|
cp --remove-destination "${mount_point}"/"$(readlink "${f}")" "${f}"
|
||||||
|
fi
|
||||||
|
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
line_function="$(echo "${line}" | head -c 4)"
|
line_function="$(echo "${line}" | head -c 4)"
|
||||||
|
|
||||||
|
@ -876,6 +881,7 @@ if [ "$(ls "${mount_point}" 2>/dev/null)" ] || \
|
||||||
|
|
||||||
mkdir -p "${HOME}"/.local/share
|
mkdir -p "${HOME}"/.local/share
|
||||||
cp -nr "${mount_point}"/usr/share/icons "${HOME}"/.local/share 2>/dev/null
|
cp -nr "${mount_point}"/usr/share/icons "${HOME}"/.local/share 2>/dev/null
|
||||||
|
rm -rf "${applications_dir}"_temp
|
||||||
|
|
||||||
echo "Desktop files have been exported"
|
echo "Desktop files have been exported"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue