summaryrefslogtreecommitdiff
path: root/kakaotalk
diff options
context:
space:
mode:
Diffstat (limited to 'kakaotalk')
-rwxr-xr-xkakaotalk26
1 files changed, 17 insertions, 9 deletions
diff --git a/kakaotalk b/kakaotalk
index 248bf9b..6234ef7 100755
--- a/kakaotalk
+++ b/kakaotalk
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright (c) 2023 Ho Kim (ho.kim@ulagbulag.io). All rights reserved.
+# Copyright (c) 2023-2024 Ho Kim (ho.kim@ulagbulag.io). All rights reserved.
# Use of this source code is governed by The Unlicense license that can be
# found in the LICENSE file.
@@ -45,20 +45,28 @@ function _install_wine() {
# Restore home directory
export HOME="${HOME_ORIGIN}"
+ # Link the wine home directory to the wild
+ HOME_WINE="$(
+ find "${WINEPREFIX}/drive_c/users" \
+ -mindepth 1 -maxdepth 1 -type d -not -name 'Public'
+ )"
+ mv "${HOME_WINE}" "${HOME_WINE}-bak" || true
+ ln -sf "${HOME}" "${HOME_WINE}"
+
# Create a desktop shortcut
if [ -d "${XDG_DATA_HOME:-${HOME}/.local/share}/applications" ]; then
ICON_SRC='/usr/share/applications/kakaotalk.desktop'
ICON_DST="${XDG_DATA_HOME:-${HOME}/.local/share}/applications/kakaotalk.desktop"
- if [ ! -f "${ICON_DST}" ]; then
+ if [ -f "${ICON_SRC}" ] && [ ! -f "${ICON_DST}" ]; then
mkdir -p "$(dirname "${ICON_DST}")"
cp "${ICON_SRC}" "${ICON_DST}"
chmod u+x "${ICON_DST}"
- # Mark as trusted
- if which gio >/dev/null 2>/dev/null; then
- gio set -t string "${ICON_DST}" metadata::xfce-exe-checksum "$(sha256sum "${ICON_SRC}" | awk '{print $1}')"
- fi
+ # # Mark as trusted
+ # if which gio >/dev/null 2>/dev/null; then
+ # gio set -t string "${ICON_DST}" metadata::xfce-exe-checksum "$(sha256sum "${ICON_SRC}" | awk '{print $1}')"
+ # fi
fi
fi
}
@@ -73,9 +81,9 @@ function _font_install() {
FONT_DIR="${WINEPREFIX}/drive_c/windows/Fonts"
echo 'Installing Fonts...'
- curl -s "${FONT_URL}" -o "${DST_FONT}/nanum-all.zip"
+ curl -s "${FONT_URL}" -o "${DST_FONT}/nanum-all.zip" 2>/dev/null
! command -v unzip &>/dev/null && sudo pacman -Sy unzip
- unzip "${DST_FONT}/nanum-all.zip" -d "${DST_FONT}"
+ unzip "${DST_FONT}/nanum-all.zip" -d "${DST_FONT}" 2>/dev/null
find "${DST_FONT}" -type f -name "*.ttf" -exec mv -f {} "${FONT_DIR}" \;
rm -rf "${DST_FONT}"
}
@@ -114,4 +122,4 @@ function main() {
}
# Execute main function
-main "$@" || exit 1
+main "$@"