mirror of
https://github.com/PR0M3TH3AN/VoxVera.git
synced 2025-09-08 23:18:42 +00:00
docs: document dependency setup
This commit is contained in:
42
setup.sh
Executable file
42
setup.sh
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
check_cmd() {
|
||||
command -v "$1" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
apt_packages=()
|
||||
|
||||
if ! check_cmd jq; then
|
||||
apt_packages+=(jq)
|
||||
fi
|
||||
|
||||
if ! check_cmd qrencode; then
|
||||
apt_packages+=(qrencode)
|
||||
fi
|
||||
|
||||
if ! check_cmd convert; then
|
||||
apt_packages+=(imagemagick)
|
||||
fi
|
||||
|
||||
if ! check_cmd pdftotext; then
|
||||
apt_packages+=(poppler-utils)
|
||||
fi
|
||||
|
||||
if ! check_cmd node || ! check_cmd npm; then
|
||||
apt_packages+=(nodejs npm)
|
||||
fi
|
||||
|
||||
if [ ${#apt_packages[@]} -gt 0 ]; then
|
||||
echo "Installing system packages: ${apt_packages[*]}"
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y "${apt_packages[@]}"
|
||||
fi
|
||||
|
||||
for pkg in javascript-obfuscator html-minifier-terser; do
|
||||
if ! check_cmd "$pkg"; then
|
||||
npm install -g "$pkg"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "All dependencies are installed."
|
Reference in New Issue
Block a user