Skip to content

Commit

Permalink
add install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
honjow committed Oct 16, 2023
1 parent c350003 commit e918bec
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@
用于[decky-loader](https://github.com/SteamDeckHomebrew/decky-loader)的插件
为安装了[holoiso](https://github.com/theVakhovskeIsTaken/holoiso)的手持设备提供性能设置调整

## 安装
## 手动安装

1. 安装[decky-loader](https://github.com/SteamDeckHomebrew/decky-loader)
2. 下载[Releases](https://github.com/Gawah/PowerControl/releases)页面的PowerControl.tar.gz
3. 解压到/home/xxxx/homebrew/plugins/下
4. 进入游戏模式,即可在decky页面使用该插件
3. 调整插件目录权限 `chmod -R 777 ${HOME}/homebrew/plugins`
4. 解压到/home/xxxx/homebrew/plugins/下
5. 重启 decky-loader, `sudo systemctl restart plugin_loader.service`
6. 进入游戏模式,即可在decky页面使用该插件

## 一键安装
```
curl -L https://raw.githubusercontent.com/mengmeet/PowerControl/main/install.sh | sh
```

## 功能
1. 开关睿频
Expand Down
30 changes: 30 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# check if jq is installed
if ! [ -x "$(command -v jq)" ]; then
echo 'Error: jq is not installed.' >&2
exit 1
fi

# Download latest release
RELEASE=$(curl -s 'https://api.github.com/repos/mengmeet/PowerControl/releases/latest')
RELEASE_VERSION=$(echo "$RELEASE" | jq -r '.tag_name')
RELEASE_URL=$(echo "$RELEASE" | jq -r '.assets[0].browser_download_url')
curl -L -o /tmp/PowerControl.tar.gz "$RELEASE_URL"

echo "Installing PowerControl $RELEASE_VERSION"

# remove old version
chmod -R 777 ${HOME}/homebrew/plugins
rm -rf ${HOME}/homebrew/plugins/PowerControl

# Extract
tar -xzf /tmp/PowerControl.tar.gz -C ${HOME}/homebrew/plugins

# Cleanup
rm -f /tmp/PowerControl.tar.gz

echo "PowerControl $RELEASE_VERSION installed"

# restart plugin_loader
sudo systemctl restart plugin_loader.service
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "PowerControl",
"version": "2.0.5",
"version": "2.0.7",
"description": "PowerControl plugin.",
"scripts": {
"build": "shx rm -rf dist && rollup -c",
Expand Down

0 comments on commit e918bec

Please sign in to comment.