Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
d9c9eda823 | |||
4737dbb60d
|
|||
f82249d10f | |||
d46ad2c2b4
|
|||
7911a7ed6f | |||
9853f854c9
|
|||
a2c8ff0f84 | |||
0ca8ed94cc
|
|||
227a0426b5 | |||
20d143035e
|
11
CHANGELOG.md
11
CHANGELOG.md
@@ -2,6 +2,17 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [0.2.2](https://git.0xmax42.io/maxp/systemd-timer/compare/v0.2.0..v0.2.2) - 2025-05-22
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
- *(install)* Enhance checksum validation with detailed comparison - ([0ca8ed9](https://git.0xmax42.io/maxp/systemd-timer/commit/0ca8ed94ccc4b9fe4ccac331957f01f852999094))
|
||||||
|
- *(install)* Ensure compatibility with non-bash shells - ([20d1430](https://git.0xmax42.io/maxp/systemd-timer/commit/20d143035ec6893f680b68dc4a2f6319ca7a5b81))
|
||||||
|
|
||||||
|
### 📚 Documentation
|
||||||
|
|
||||||
|
- *(readme)* Update installation instructions with script - ([9853f85](https://git.0xmax42.io/maxp/systemd-timer/commit/9853f854c991d87b12cd4fb5e19fce55e7246024))
|
||||||
|
|
||||||
## [0.2.0](https://git.0xmax42.io/maxp/systemd-timer/compare/v0.1.0..v0.2.0) - 2025-05-22
|
## [0.2.0](https://git.0xmax42.io/maxp/systemd-timer/compare/v0.1.0..v0.2.0) - 2025-05-22
|
||||||
|
|
||||||
### 🚀 Features
|
### 🚀 Features
|
||||||
|
24
README.md
24
README.md
@@ -24,15 +24,27 @@ Ein einfaches CLI-Tool zum schnellen Erzeugen von systemd `.service` und `.timer
|
|||||||
|
|
||||||
## 🛠️ Installation
|
## 🛠️ Installation
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://git.0xmax42.io/maxp/systemd-timer.git
|
|
||||||
cd systemd-timer
|
|
||||||
deno task build
|
|
||||||
|
|
||||||
# Binary liegt nun unter ./systemd-timer
|
Du kannst `systemd-timer` direkt per Shell-Skript installieren:
|
||||||
./systemd-timer --help
|
|
||||||
|
```bash
|
||||||
|
curl -fsSL https://git.0xmax42.io/maxp/systemd-timer/raw/branch/main/scripts/install.sh | sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Das Skript erkennt automatisch deine Plattform (Linux `amd64` oder `arm64`) und installiert die passende Binary nach `/usr/local/bin`, sofern dies erlaubt ist (ggf. mit `sudo`).
|
||||||
|
|
||||||
|
**Hinweis:**
|
||||||
|
- Für die Installation ist eine funktionierende Internetverbindung notwendig.
|
||||||
|
- Die Integrität der Binary wird mittels SHA256-Prüfsumme verifiziert.
|
||||||
|
- Du kannst das Skript vor der Ausführung auch manuell inspizieren:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -fsSL https://git.0xmax42.io/maxp/systemd-timer/raw/branch/main/scripts/install.sh -o install.sh
|
||||||
|
less install.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Weitere Optionen und manuelle Installationswege findest du unter [`scripts/install.sh`](scripts/install.sh).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 📦 Beispiel
|
## 📦 Beispiel
|
||||||
|
@@ -1,5 +1,11 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Fail-safe bash mode (only if bash is used)
|
||||||
|
if [ -n "$BASH_VERSION" ]; then
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
else
|
||||||
|
set -eu
|
||||||
|
fi
|
||||||
|
|
||||||
# === Konfiguration ===
|
# === Konfiguration ===
|
||||||
REPO_URL="https://git.0xmax42.io/maxp/systemd-timer/releases/download/latest"
|
REPO_URL="https://git.0xmax42.io/maxp/systemd-timer/releases/download/latest"
|
||||||
@@ -32,9 +38,18 @@ TMP_FILE=$(mktemp)
|
|||||||
curl -fsSL "${DOWNLOAD_URL}" -o "${TMP_FILE}"
|
curl -fsSL "${DOWNLOAD_URL}" -o "${TMP_FILE}"
|
||||||
chmod +x "${TMP_FILE}"
|
chmod +x "${TMP_FILE}"
|
||||||
|
|
||||||
# === Optional: SHA256-Check ===
|
# === SHA256-Check ===
|
||||||
curl -fsSL "${DOWNLOAD_URL}.sha256" -o "${TMP_FILE}.sha256"
|
TMP_HASH=$(mktemp)
|
||||||
echo "$(cat ${TMP_FILE}.sha256) ${TMP_FILE}" | sha256sum -c -
|
curl -fsSL "${DOWNLOAD_URL}.sha256" -o "$TMP_HASH"
|
||||||
|
EXPECTED_HASH=$(cut -d ' ' -f1 "$TMP_HASH")
|
||||||
|
ACTUAL_HASH=$(openssl dgst -sha256 "$TMP_FILE" | awk '{print $2}')
|
||||||
|
|
||||||
|
if [ "$EXPECTED_HASH" != "$ACTUAL_HASH" ]; then
|
||||||
|
echo "⚠️ Checksum mismatch!"
|
||||||
|
echo "Expected: $EXPECTED_HASH"
|
||||||
|
echo "Actual: $ACTUAL_HASH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# === Installation ===
|
# === Installation ===
|
||||||
echo "🚀 Installing to ${INSTALL_PATH}/${BINARY_NAME}"
|
echo "🚀 Installing to ${INSTALL_PATH}/${BINARY_NAME}"
|
||||||
|
Reference in New Issue
Block a user