forked from jamulussoftware/jamuluswebsite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpo4a-cache.sh
More file actions
executable file
·22 lines (17 loc) · 910 Bytes
/
po4a-cache.sh
File metadata and controls
executable file
·22 lines (17 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# If the po4a cache already exists, this script copies all the dependencies to their locations.
# If not, it installs po4a and its dependencies, then copies them all to a folder to be cached/retrieved by the GH action.
if [[ "$CACHE_HIT" == 'true' ]] ; then
sudo cp --force --recursive ~/po4a/* /
else
sudo apt install -yq gettext libsgmls-perl libyaml-tiny-perl opensp libsyntax-keyword-try-perl libxs-parse-keyword-perl
wget -O po4a.deb https://github.com/jamulussoftware/assets/raw/main/po4a/po4a_0.75.deb
sudo dpkg -i po4a.deb
if [ -f po4a.deb ] ; then
rm po4a.deb
fi
mkdir -p ~/po4a
for dep in po4a libcroco3 libosp5 sgml-base gettext libsgmls-perl libyaml-tiny-perl opensp libsyntax-keyword-try-perl libxs-parse-keyword-perl; do
dpkg -L $dep | while IFS= read -r f; do if test -f $f; then echo $f; fi; done | xargs cp --parents --target-directory ~/po4a/
done
fi