feat: switch to biome, apply formatting, shellcheck (#227)

* feat: switch to biome, apply formatting, shellcheck
* chore: apply cr comments
* chore: few config tweaks, shellcheck hook now py-based
* chore: lint fixes and pr comments
* chore(lint): megalinter, and other fixes

Signed-off-by: Ismo Vuorinen <ismo@ivuorinen.net>
This commit is contained in:
2025-12-17 16:03:29 +02:00
committed by GitHub
parent 4b0e38ffd2
commit 961efec364
69 changed files with 782 additions and 1089 deletions

View File

@@ -37,9 +37,7 @@ if [[ ! -f "$KEYS_FILE" ]]; then
mkdir -p "$(dirname "$KEYS_FILE")"
# Fetch the keys and save to the file
curl -s "$KEYS_SOURCE" -o "$KEYS_FILE"
if [[ $? -ne 0 || ! -s "$KEYS_FILE" ]]; then
if ! curl -s "$KEYS_SOURCE" -o "$KEYS_FILE" || [[ ! -s "$KEYS_FILE" ]]; then
echo "Error: Failed to fetch keys from $KEYS_SOURCE"
exit 1
fi
@@ -51,9 +49,7 @@ fi
# Encrypt the file
OUTPUT_FILE="${FILE}.age"
age -R "$KEYS_FILE" "$FILE" > "$OUTPUT_FILE"
if [[ $? -eq 0 ]]; then
if age -R "$KEYS_FILE" "$FILE" > "$OUTPUT_FILE"; then
echo "File encrypted successfully: $OUTPUT_FILE"
else
echo "Error: Failed to encrypt file."