mirror of
https://github.com/PR0M3TH3AN/VoxVera.git
synced 2025-09-09 15:38:43 +00:00
Merge pull request #5 from PR0M3TH3AN/codex/update-shell-scripts-for-error-handling
Improve dependency checks for flyer scripts
This commit is contained in:
@@ -1,6 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -e
|
set -euo pipefail
|
||||||
|
|
||||||
|
require_cmd() {
|
||||||
|
command -v "$1" >/dev/null 2>&1 || {
|
||||||
|
echo "Error: required command '$1' not found" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for cmd in jq node javascript-obfuscator html-minifier-terser; do
|
||||||
|
require_cmd "$cmd"
|
||||||
|
done
|
||||||
|
|
||||||
CONFIG_PATH="src/config.json"
|
CONFIG_PATH="src/config.json"
|
||||||
FROM_PDF=""
|
FROM_PDF=""
|
||||||
@@ -32,9 +43,6 @@ while [[ $# -gt 0 ]]; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# Ensure jq is installed
|
|
||||||
command -v jq >/dev/null 2>&1 || { echo "jq is required" >&2; exit 1; }
|
|
||||||
|
|
||||||
# Helper function to update config
|
# Helper function to update config
|
||||||
update_config_interactive() {
|
update_config_interactive() {
|
||||||
read -rp "Name: " name
|
read -rp "Name: " name
|
||||||
|
@@ -1,5 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
require_cmd() {
|
||||||
|
command -v "$1" >/dev/null 2>&1 || {
|
||||||
|
echo "Error: required command '$1' not found" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for cmd in javascript-obfuscator html-minifier-terser node; do
|
||||||
|
require_cmd "$cmd"
|
||||||
|
done
|
||||||
|
|
||||||
# Input and output file names
|
# Input and output file names
|
||||||
input_file="index-master.html"
|
input_file="index-master.html"
|
||||||
output_file="index.html"
|
output_file="index.html"
|
||||||
|
@@ -1,5 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
require_cmd() {
|
||||||
|
command -v "$1" >/dev/null 2>&1 || {
|
||||||
|
echo "Error: required command '$1' not found" >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for cmd in javascript-obfuscator html-minifier-terser node; do
|
||||||
|
require_cmd "$cmd"
|
||||||
|
done
|
||||||
|
|
||||||
# Input and output file names
|
# Input and output file names
|
||||||
input_file="nostr-master.html"
|
input_file="nostr-master.html"
|
||||||
output_file="nostr.html"
|
output_file="nostr.html"
|
||||||
|
Reference in New Issue
Block a user