Skip to content

Commit

Permalink
Fix:typo (#3)
Browse files Browse the repository at this point in the history
* Fix:typo
  • Loading branch information
DataEraserC authored Jan 24, 2024
1 parent 93063a6 commit 4136572
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions install_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,18 @@ source $config_file
# 进入安装目录
cd /opt/QQ/resources/app/app_launcher

# 修改index.json
echo "正在修补index.json..."
# 修改index.js
echo "正在修补index.js..."

# 检查是否已存在相同的修改
if grep -q "require('/opt/QQ/resources/app/LiteLoader');" index.js; then
echo "index.json 已包含相同的修改,无需再次修改。"
echo "index.js 已包含相同的修改,无需再次修改。"
else
# 如果不存在,则进行修改
sudo sed -i '' -e "1i\\
require('/opt/QQ/resources/app/LiteLoader');\
" -e '$a\' index.js
echo "已修补 index.json"
echo "已修补 index.js"
fi

echo "安装完成!脚本将在3秒后退出..."
Expand Down
8 changes: 4 additions & 4 deletions install_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,18 @@ fi
# 进入安装目录
cd /Applications/QQ.app/Contents/Resources/app/app_launcher

# 修改index.json
echo "正在修补index.json..."
# 修改index.js
echo "正在修补index.js..."

# 检查是否已存在相同的修改
if grep -q "require('$HOME/Library/Containers/com.tencent.qq/Data/Documents/LiteLoader');" index.js; then
echo "index.json 已包含相同的修改,无需再次修改。"
echo "index.js 已包含相同的修改,无需再次修改。"
else
# 如果不存在,则进行修改
sudo sed -i '' -e "1i\\
require('$HOME/Library/Containers/com.tencent.qq/Data/Documents/LiteLoader');\
" -e '$a\' index.js
echo "已修补 index.json"
echo "已修补 index.js"
fi

echo "安装完成!脚本将在3秒后退出..."
Expand Down
8 changes: 4 additions & 4 deletions install_mac_launchd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,18 @@ launchctl setenv LITELOADERQQNT_PROFILE $pluginsDir
# 进入安装目录
cd /Applications/QQ.app/Contents/Resources/app/app_launcher

# 修改index.json
echo "正在修补index.json..."
# 修改index.js
echo "正在修补index.js..."

# 检查是否已存在相同的修改
if grep -q "require('$HOME/Library/Containers/com.tencent.qq/Data/Documents/LiteLoader');" index.js; then
echo "index.json 已包含相同的修改,无需再次修改。"
echo "index.js 已包含相同的修改,无需再次修改。"
else
# 如果不存在,则进行修改
sudo sed -i '' "1i\\
require('$HOME/Library/Containers/com.tencent.qq/Data/Documents/LiteLoader');\
" index.js
echo "已修补 index.json"
echo "已修补 index.js"
fi

echo "安装完成!脚本将在3秒后退出..."
Expand Down
4 changes: 2 additions & 2 deletions install_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ def main():
# 进入安装目录
os.chdir(app_launcher_path)

# 修改index.json
print("正在修补index.json...")
# 修改index.js
print("正在修补index.js...")
index_path = os.path.join(app_launcher_path, "index.js")
with open(index_path, "r+") as f:
content = f.read()
Expand Down

0 comments on commit 4136572

Please sign in to comment.