Created
September 18, 2023 07:22
-
-
Save chaeya/026e270f35d97db8143c1fa94e350292 to your computer and use it in GitHub Desktop.
install kakaotalk on ubuntu 22.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
RUID=$(who | awk 'FNR == 1 {print $1}') | |
echo "$RUID" | |
# 인터넷 연결상태 확인 | |
nslookup www.google.com | grep authoritative > /dev/null 2>&1 | |
if [[ $? != 0 ]]; then | |
zenity --info --width 200 --text "인터넷 연결상태를 확인해주세요" | |
exit 0 | |
fi | |
# 중복 실행 방지 | |
if [ -f /tmp/kakaotalkworking ]; then | |
zenity --info --width 200 --text "인스톨러가 실행중입니다." | |
exit 0 | |
else | |
touch /tmp/kakaotalkworking | |
fi | |
# 강제 종료 되거나 작업 완료 되었을때 진행 | |
trap 'rm /tmp/kakaotalkworking' EXIT | |
# lutris 설치 확인 | |
CHECK=$(dpkg -l | grep lutris) | |
CHECK_iHR=$(dpkg -l | grep lutris | grep -o iHR) | |
if [ ! -z "$CHECK_iHR" ]; then | |
zenity --info --width 300 --text "lutris 패키지가 정상적이지 않습니다.\n다시 설치해주세요" | |
dpkg --configure -a | |
dpkg --remove --force-remove-reinstreq lutris | |
exit 0 | |
fi | |
if [ ! -z "$CHECK" ]; then | |
# lutris 에서 설치 | |
if [ -d "/home/$RUID/Games/kakaotalk" ]; then | |
zenity --info --width 350 --text "이미 설치되어 있습니다.\n/home/$RUID/Games/kakaotalk\n폴더를 제거하고 다시 실행해주세요" | |
exit 0 | |
else | |
if [ ! -f "/usr/lib/linuxmint/mintwelcome/KakaoTalk.yml" ] ; then | |
sudo wget -O /usr/lib/linuxmint/mintwelcome/KakaoTalk.yml https://raw.githubusercontent.com/hamonikr/hamonikr-welcome/master/usr/lib/linuxmint/mintwelcome/KakaoTalk.yml | |
fi | |
sudo -u $RUID /usr/games/lutris -i /usr/lib/linuxmint/mintwelcome/KakaoTalk.yml | |
fi | |
else | |
if zenity --question --width 350 --text="카카오톡을 설치하려면 lutris 프로그램이 필요합니다.\n설치하시겠습니까?"; then | |
sudo add-apt-repository -y ppa:lutris-team/lutris | |
sudo apt update | |
sudo apt install -y lutris | |
sudo -u $RUID /usr/games/lutris -i /usr/lib/linuxmint/mintwelcome/KakaoTalk.yml | |
else | |
# 설치 취소 | |
exit 0; | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment