File tree Expand file tree Collapse file tree 5 files changed +39
-14
lines changed Expand file tree Collapse file tree 5 files changed +39
-14
lines changed Original file line number Diff line number Diff line change 1
1
[target.aarch64-unknown-linux-gnu]
2
- linker = "aarch64-linux-gnu-gcc"
2
+ linker = "aarch64-linux-gnu-gcc"
3
+
4
+ [target.armv7-unknown-linux-gnueabihf]
5
+ linker = "arm-linux-gnueabihf-gcc"
Original file line number Diff line number Diff line change @@ -15,16 +15,18 @@ jobs:
15
15
16
16
build :
17
17
runs-on : ubuntu-latest
18
+ strategy :
19
+ matrix :
20
+ target : [aarch64-unknown-linux-gnu, armv7-unknown-linux-gnueabihf]
18
21
steps :
19
22
- uses : actions/checkout@v3
20
- - name : Install cross
21
- run : cargo install cross
22
- - name : Build
23
- run : cross build --target aarch64-unknown-linux-gnu --release
24
- - name : Archive
23
+ - name : Install dependencies
24
+ run : |
25
+ cargo install cross
26
+ - name : Build binaries
27
+ run : cross build --target ${{ matrix.target }} --release
28
+ - name : Archive binaries
25
29
uses : actions/upload-artifact@v3
26
30
with :
27
- name : rustberry-poe-monitor
28
- path : target/aarch64-unknown-linux-gnu/release/rustberry-poe-monitor
29
-
30
-
31
+ name : rustberry-poe-monitor-${{ matrix.target == 'aarch64-unknown-linux-gnu' && 'aarch64' || 'armv7l' }}
32
+ path : target/${{ matrix.target }}/release/rustberry-poe-monitor
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " rustberry-poe-monitor"
3
- version = " 1.0.1 "
3
+ version = " 1.0.2 "
4
4
edition = " 2021"
5
5
authors = [" jackra1n" ]
6
6
description = " A simple PoE Monitor for Raspberry Pi Waveshare PoE HAT (B)"
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ This tool provides real-time monitoring of your Raspberry Pi's system statistics
39
39
40
40
Run the following command to install:
41
41
``` bash
42
- curl -sSL https://raw.githubusercontent .com/jackra1n/RustBerry-PoE-Monitor/main/ install.sh | sudo bash
42
+ curl -sSL https://rustberry.jackra1n .com/install | sudo bash
43
43
```
44
44
45
45
And that's it!
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
- LATEST_RELEAST_URL=" https://github.com/jackra1n/RustBerry-PoE-Monitor/releases/latest/download/rustberry-poe-monitor"
3
2
4
3
# Check if script is run as root
5
4
if [ " $EUID " -ne 0 ]
6
5
then echo " Please run as root"
7
6
exit
8
7
fi
9
8
9
+ # Only run on aarch64 or armv7l
10
+ ARCH=$( uname -m)
11
+ echo " Architecture: $ARCH "
12
+ if [ " $ARCH " != " aarch64" ] && [ " $ARCH " != " armv7l" ]; then
13
+ echo " This script is only intended to run on aarch64 or armv7l"
14
+ exit 1
15
+ fi
16
+
17
+ # Check if running on a Raspberry Pi
18
+ if ! grep -q " Raspberry Pi" /proc/device-tree/model; then
19
+ echo " This script is only intended to run on a Raspberry Pi"
20
+ exit 1
21
+ fi
22
+
23
+ # Enable I2C
24
+ echo " Enabling I2C"
25
+ sudo raspi-config nonint do_i2c 0
26
+
27
+ # Set download url based on architecture
28
+ LATEST_RELEAST_URL=" https://github.com/jackra1n/RustBerry-PoE-Monitor/releases/latest/download/rustberry-poe-monitor-$ARCH "
29
+
10
30
# Download latest binary from github and place it in /usr/local/bin
11
- echo " Downloading latest binary from github"
31
+ echo " Downloading latest $ARCH binary from github"
12
32
curl -sSL $LATEST_RELEAST_URL -o /usr/local/bin/rustberry-poe-monitor
13
33
14
34
# Make binary executable
You can’t perform that action at this time.
0 commit comments