From 5a8eceaf5f327de5e74fade5aa9ac69c2a1205e3 Mon Sep 17 00:00:00 2001 From: Jim Myers Date: Wed, 22 May 2024 09:36:17 -0400 Subject: [PATCH] updates --- localinstall.sh | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/localinstall.sh b/localinstall.sh index 91f7c9c..38faf27 100644 --- a/localinstall.sh +++ b/localinstall.sh @@ -1,21 +1,25 @@ #!/bin/bash -dirLocal=$(pwd) - # go to the version folder if [ -z "$1" ]; then - echo "The variable is empty." + echo "The variable is empty. Provide the relative path to the previewer version you wish to make an all-local instance of." exit 1 fi folder="$1" cd "${folder}" - +echo Downloading local copies of remote JavaScript libraries: sed -n 's/.*src="\(http[^"]*\)".*/\1/p' *.html | sort -u | sed -n 's/^\(.*\/\)*\(.*\)/sed -i \x27s,\0\,lib\/\2,\x27 *.html/p' > replace_js.sh sed -n 's/.*src="\(http[^"]*\)".*/\1/p' *.html | sort -u > urls_js.txt source replace_js.sh +cat urls_js.txt +echo Downloading local copies of remote CSS files: +sed -n 's/.* replace_css.sh +sed -n 's/.*