mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
VARA Downloader - Added pup command for HTML procesing
This commit is contained in:
Executable
+39
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user