-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·41 lines (32 loc) · 865 Bytes
/
Copy pathinstall.sh
File metadata and controls
executable file
·41 lines (32 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
set -euo pipefail
echo "Checking dependencies…"
echo
# ---- LibreOffice (GUI app, via cask) ----
if [[ -d "/Applications/LibreOffice.app" ]]; then
echo "LibreOffice already installed."
else
echo "LibreOffice not found. Installing…"
brew install --cask libreoffice
fi
echo
# ---- poppler / pdftoppm (CLI tool) ----
if command -v pdftoppm >/dev/null 2>&1; then
echo "pdftoppm already installed."
else
echo "pdftoppm not found. Installing poppler…"
brew install poppler
fi
echo
echo "Verifying installations…"
echo
# ---- Verification ----
if [[ ! -d "/Applications/LibreOffice.app" ]]; then
echo "ERROR: LibreOffice installation failed."
exit 1
fi
if ! command -v pdftoppm >/dev/null 2>&1; then
echo "ERROR: pdftoppm installation failed."
exit 1
fi
echo "All dependencies installed and verified successfully."