VARA Downloader - Added pup command for HTML procesing

This commit is contained in:
Gaston Gonzalez
2025-02-28 03:57:36 -07:00
parent 1abcf77687
commit da7d5cdd4e
2 changed files with 41 additions and 1 deletions
+39
View File
@@ -0,0 +1,39 @@
#!/bin/bash
# Author : Gaston Gonzalez
# Date : 28 February 2025
# Purpose : Install pup (HTML processing)
VERSION="0.4.0"
ZIP_FILE="pup_v${VERSION}_linux_amd64.zip"
INSTALL_DIR="/opt/pup-${VERSION}"
INSTALL_DIR_BIN="${INSTALL_DIR}/bin"
LINK_PATH="/opt/pup"
et-log "Installing pup (HTML processing tool)..."
URL="https://github.com/ericchiang/pup/releases/download/v${VERSION}/${ZIP_FILE}"
et-log "Downloading pup: ${URL}"
curl -s -f -L -o ${ZIP_FILE} ${URL}
[[ $? -ne 0 ]] && et-log "Error fetching pup" && exit 1
mv -v ${ZIP_FILE} ${ET_DIST_DIR}
CWD_DIR=$(pwd)
if [[ ! -e "${INSTALL_DIR}" ]]; then
mkdir -v -p ${INSTALL_DIR_BIN} && cd ${INSTALL_DIR_BIN}
unzip ${ET_DIST_DIR}/${ZIP_FILE}
else
et-log "${INSTALL_DIR} already exists."
fi
chmod 755 ${INSTALL_DIR_BIN}/pup
[[ -e ${LINK_PATH} ]] && rm ${LINK_PATH}
ln -s ${INSTALL_DIR} ${LINK_PATH}
stow -v -d /opt pup -t /usr/local
cd ${CWD_DIR}
+2 -1
View File
@@ -2,7 +2,7 @@
#
# Author : Gaston Gonzalez
# Date : 16 March 2024
# Updated : 20 January 2025
# Updated : 28 February 2025
# Purpose : Main installer for EmComm Tools OS Community
. ./env.sh
@@ -15,6 +15,7 @@ exitIfNotRoot
./install-base.sh
./install-dev-tools.sh
./install-pup.sh
./install-browser.sh
./remove-packages.sh
./install-branding.sh