mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-15 11:53:29 +00:00
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:
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user