Skip to content

Commit

Permalink
hwmonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
hemnstill committed Mar 7, 2024
1 parent 252a9b0 commit 663bc38
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions HWMonitor/create_install.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo off
"%~dp0..\.tools\busybox.exe" bash "%~dp0create_install.sh"

exit /b %errorlevel%
21 changes: 21 additions & 0 deletions HWMonitor/create_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
dp0="$(realpath "$(dirname "$0")")"
dp0_tools="$dp0/../.tools" && source "$dp0_tools/env_tools.sh"
set -e
cd "$dp0"

latest_version=https://www.cpuid.com/softwares/hwmonitor.html
echo Get latest version: "$latest_version" ...
download_url=$($curl --silent --location "$latest_version" | "$grep" --only-matching '(?<=href=")[^\s]+hwmonitor/hwmonitor[^\s]+\.zip(?=")' | head -n1)
[[ -z "$download_url" ]] && {
echo "Cannot get release version"
exit 1
}

filename="$(basename -- "$download_url")"
download_url="https://download.cpuid.com/hwmonitor/$filename"
echo "Downloading: $download_url ..."
$curl --location "$download_url" --remote-name

echo Extracting ...
"$p7z" e "$filename" "-o." *_x64.exe -aoa -r

0 comments on commit 663bc38

Please sign in to comment.