offline - Added a few sample offline documentation samples

This commit is contained in:
thetechprepper
2026-03-14 19:36:22 -07:00
parent f0803bfe35
commit 8245611c01
3 changed files with 57 additions and 1 deletions
+22
View File
@@ -0,0 +1,22 @@
[
{
"url": "https://www.arrl.org/files/file/Regulatory/Band%20Chart/Hambands4_Color_11x8_5.pdf",
"file": "Hambands4_Color_11x8_5.pdf",
"dir": "bands/ham-radio"
},
{
"url": "https://amrron.com/wp-content/uploads/2019/03/AmRRON-Intelligence-Brief-White-Paper.pdf",
"file": "AmRRON-Intelligence-Brief-White-Paper.pdf",
"dir": "nets/amrron"
},
{
"url": "https://raw.githubusercontent.com/s2underground/GhostNet/1a2d08d579813e54967af06f1a871e7fa0ce583f/GhostNet_Version_1.5.pdf",
"file": "GhostNet_Version_1.5.pdf",
"dir": "nets/ghostnet"
},
{
"url": "https://www.swpc.noaa.gov/sites/default/files/images/NOAAscales.pdf",
"file": "NOAAscales.pdf",
"dir": "space-weather"
}
]
+31
View File
@@ -0,0 +1,31 @@
#!/bin/bash
# Author : Gaston Gonzalez
# Date : 14 March 2026
# Purpose : Installs a variety of offline resources
. ./env.sh
. ../overlay/opt/emcomm-tools/bin/et-common
et-log "Installing offline docs..."
OFFLINE_FILES_JSON="install-offline-lib.json"
OFFLINE_SAVE_DIR="/etc/skel/Desktop/offline"
[[ ! -e "${OFFLINE_SAVE_DIR}" ]] && mkdir -v -p ${OFFLINE_SAVE_DIR}
jq -c '.[]' "${OFFLINE_FILES_JSON}" | while read -r item; do
URL=$(echo "$item" | jq -r '.url')
FILE=$(echo "$item" | jq -r '.file')
DIR=$(echo "$item" | jq -r '.dir')
ABS_DIR="${OFFLINE_SAVE_DIR}/${DIR}"
# 1. Create missing directories
mkdir -v -p "${ABS_DIR}"
# 2. Download resources
download_with_retries ${URL} ${FILE}
# 3. Move to offline folder
mv "${FILE}" "${ABS_DIR}/"
done
+4 -1
View File
@@ -2,7 +2,7 @@
#
# Author : Gaston Gonzalez
# Date : 16 March 2024
# Updated : 6 March 2026
# Updated : 14 March 2026
# Purpose : Main installer for EmComm Tools Community (ETC)
. ./env.sh
@@ -102,3 +102,6 @@ exitIfNotRoot
# Install security tools
./install-gpa.sh
# Install offline resources
./install-offline-lib.sh