summaryrefslogtreecommitdiff
path: root/notepadpp/build-orig-tarball.sh
diff options
context:
space:
mode:
Diffstat (limited to 'notepadpp/build-orig-tarball.sh')
-rwxr-xr-xnotepadpp/build-orig-tarball.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/notepadpp/build-orig-tarball.sh b/notepadpp/build-orig-tarball.sh
index 275a1aa..190196e 100755
--- a/notepadpp/build-orig-tarball.sh
+++ b/notepadpp/build-orig-tarball.sh
@@ -39,13 +39,16 @@ which jq 1>/dev/null 2>&1 || { echo "Please install jq! Aborted." ; exit 1; }
latest_version="$( curl -s "https://notepad-plus-plus.org/downloads/" | grep -oiE "Current Version [0-9\.]+" | grep -oE "[0-9\.a-zA-Z]+$" )"
ferror "USING VERSION ${latest_version}"
+
## 2. dl npp main version, 32 and 64
# magic awk written 2020-10-05 to handle naming convention change from 7.8.9.bin to 7.9.portable.
lv_compare="$( echo "${latest_version}" | awk -v 'maxsections=3' -F'.' 'NF < maxsections {printf("%s",$0);for(i=NF;i<maxsections;i++)printf("%s",".0");printf("\n")} NF >= maxsections {print}' | awk -v 'maxdigits=2' -F'.' '{print $1*10^(maxdigits*2)+$2*10^(maxdigits)+$3}' )"
export fn_section=".portable"
+short_version="${latest_version}"
test ${lv_compare} -lt 70900 && export fn_section=".bin"
-get "https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v${latest_version}/npp.${latest_version}${fn_section}.7z"
-get "https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v${latest_version}/npp.${latest_version}${fn_section}.x64.7z"
+test ${lv_compare} -ge 80000 && export short_version="8"
+get "https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v${short_version}/npp.${latest_version}${fn_section}.7z"
+get "https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v${short_version}/npp.${latest_version}${fn_section}.x64.7z"
## 3. dl 32 plugins
# fetch master list of plugins
bgstack15