fixing build.sh for new age and nvm

This commit is contained in:
bel
2023-04-27 21:45:08 -06:00
parent 196bcac6dd
commit 6e98d349e8
3 changed files with 106 additions and 52 deletions

View File

@@ -24,11 +24,14 @@ install() {
if ! which wkhtmltopdf &> /dev/null; then
log installing wkhtmltopdf
false
sudo apt -y install xfonts-75dpi
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb
sudo dpkg -i wkhtmltox_0.12.6-1.focal_amd64.deb
rm ./wkhtml*.deb
local d=$(mktemp -d)
apt -y install xfonts-75dpi
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb -O "$d/wkhtmltox.deb"
if ! dpkg -i "$d/wkhtmltox.deb"; then
apt-get -f install
dpkg -i "$d/wkhtmltox.deb"
fi
rm -rf "$d"
fi
}
@@ -37,7 +40,7 @@ install_cli() {
return
fi
sudo npm install -g resume-cli
_npm install -g resume-cli
which resume
}
@@ -47,7 +50,7 @@ install_themes() {
return
fi
log installing theme $theme
if ! npm install jsonresume-theme-$theme; then
if ! _npm install jsonresume-theme-$theme; then
log failed
export THEMES="${THEMES//,$theme,/,}"
else
@@ -79,6 +82,12 @@ build_theme() {
) || true
}
_npm() {
which npm || exit 1
echo "> $(which npm) "$@"" >&2
$(which npm) "$@"
}
log() {
echo "$(date) > $*" >&2