Skip to content

Commit 204a3c8

Browse files
author
Yuchen Deng
committed
优化字符串判断
1 parent 5ee5e4f commit 204a3c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

base-config.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,8 +702,8 @@ chmod 755 /usr/local/bin/$1-libreoffice
702702
# 添加启动器
703703
machinectl start $1 && sleep 0.5
704704
echo
705-
[[ $(su -w DISPLAY - $SUDO_USER -c "$1-query" | grep com.qq.im.deepin.desktop) ]] && [[ ! -f /usr/share/applications/deepin-qq.desktop || ! -f /usr/share/pixmaps/com.qq.im.deepin.svg ]] && su -w DISPLAY - $SUDO_USER -c "$1-install-qq"
706-
[[ $(su -w DISPLAY - $SUDO_USER -c "$1-query" | grep com.qq.weixin.deepin.desktop) ]] && [[ ! -f /usr/share/applications/deepin-weixin.desktop || ! -f /usr/share/pixmaps/com.qq.weixin.deepin.svg ]] && su -w DISPLAY - $SUDO_USER -c "$1-install-weixin"
705+
[ -n "$(su -w DISPLAY - $SUDO_USER -c "$1-query" | grep com.qq.im.deepin.desktop)" ] && [[ ! -f /usr/share/applications/deepin-qq.desktop || ! -f /usr/share/pixmaps/com.qq.im.deepin.svg ]] && su -w DISPLAY - $SUDO_USER -c "$1-install-qq"
706+
[ -n "$(su -w DISPLAY - $SUDO_USER -c "$1-query" | grep com.qq.weixin.deepin.desktop)" ] && [[ ! -f /usr/share/applications/deepin-weixin.desktop || ! -f /usr/share/pixmaps/com.qq.weixin.deepin.svg ]] && su -w DISPLAY - $SUDO_USER -c "$1-install-weixin"
707707
[ -f /usr/share/applications/deepin-qq.desktop ] && cat /usr/share/applications/deepin-qq.desktop | grep $1-
708708
[ -f /usr/share/applications/deepin-weixin.desktop ] && cat /usr/share/applications/deepin-weixin.desktop | grep $1-
709709

0 commit comments

Comments
 (0)