From d066af3b0e92c03a27875eb8a23dea6546d5819c Mon Sep 17 00:00:00 2001 From: B Stack Date: Mon, 5 Oct 2020 10:44:44 -0400 Subject: notepadpp 7.9 --- notepadpp/build-orig-tarball.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'notepadpp/build-orig-tarball.sh') diff --git a/notepadpp/build-orig-tarball.sh b/notepadpp/build-orig-tarball.sh index 80b2260..275a1aa 100755 --- a/notepadpp/build-orig-tarball.sh +++ b/notepadpp/build-orig-tarball.sh @@ -40,8 +40,12 @@ latest_version="$( curl -s "https://notepad-plus-plus.org/downloads/" | grep -oi ferror "USING VERSION ${latest_version}" ## 2. dl npp main version, 32 and 64 -get "https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v${latest_version}/npp.${latest_version}.bin.7z" -get "https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v${latest_version}/npp.${latest_version}.bin.x64.7z" +# 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 {print}' | awk -v 'maxdigits=2' -F'.' '{print $1*10^(maxdigits*2)+$2*10^(maxdigits)+$3}' )" +export fn_section=".portable" +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" ## 3. dl 32 plugins # fetch master list of plugins @@ -71,14 +75,14 @@ test -z "${DRYRUN}" && { mkdir -p "notepadpp-${latest_version}" ; cd "notepadpp- test -n "${DEBUG}" && ferror "mkdir -p notepadpp-bin32 notepadpp-bin64" test -z "${DRYRUN}" && { mkdir -p notepadpp-bin32 notepadpp-bin64 ; } -test -n "${DEBUG}" && ferror "cd notepadpp-bin32 ; 7za -bd -aoa x ../../\"npp.${latest_version}.bin.7z\" ; cd plugins ; 7za -bd -aoa x ../../../\"${file_current_plugin_32_Compare}\" ; 7za -bd -aoa x ../../../\"${file_current_plugin_32_TextFX}\" ; cd ../.. " -test -z "${DRYRUN}" && { cd notepadpp-bin32 ; 7za -bd -aoa x ../../"npp.${latest_version}.bin.7z" ; cd plugins ; 7za -bd -aoa x ../../../"${file_current_plugin_32_Compare}" ; 7za -bd -aoa x ../../../"${file_current_plugin_32_TextFX}" ; cd ../..; } -test -n "${DEBUG}" && ferror "cd notepadpp-bin64 ; 7za -bd -aoa x ../../\"npp.${latest_version}.bin.x64.7z\" ; cd plugins ; 7za -bd -aoa x ../../../\"${file_current_plugin_64_Compare}\" ; cd ../.. " -test -z "${DRYRUN}" && { cd notepadpp-bin64 ; 7za -bd -aoa x ../../"npp.${latest_version}.bin.x64.7z" ; cd plugins ; 7za -bd -aoa x ../../../"${file_current_plugin_64_Compare}" ; cd ../.. ; } +test -n "${DEBUG}" && ferror "cd notepadpp-bin32 ; 7za -bd -aoa x ../../\"npp.${latest_version}${fn_section}.7z\" ; cd plugins ; 7za -bd -aoa x ../../../\"${file_current_plugin_32_Compare}\" ; 7za -bd -aoa x ../../../\"${file_current_plugin_32_TextFX}\" ; cd ../.. " +test -z "${DRYRUN}" && { cd notepadpp-bin32 ; 7za -bd -aoa x ../../"npp.${latest_version}${fn_section}.7z" ; cd plugins ; 7za -bd -aoa x ../../../"${file_current_plugin_32_Compare}" ; 7za -bd -aoa x ../../../"${file_current_plugin_32_TextFX}" ; cd ../..; } +test -n "${DEBUG}" && ferror "cd notepadpp-bin64 ; 7za -bd -aoa x ../../\"npp.${latest_version}${fn_section}.x64.7z\" ; cd plugins ; 7za -bd -aoa x ../../../\"${file_current_plugin_64_Compare}\" ; cd ../.. " +test -z "${DRYRUN}" && { cd notepadpp-bin64 ; 7za -bd -aoa x ../../"npp.${latest_version}${fn_section}.x64.7z" ; cd plugins ; 7za -bd -aoa x ../../../"${file_current_plugin_64_Compare}" ; cd ../.. ; } test -n "${DEBUG}" && ferror "cd .." test -z "${DRYRUN}" && cd .. test -n "${DEBUG}" && ferror "tar -zcf \"notepadpp_${latest_version}.orig.tar.gz\" \"notepadpp-${latest_version}\"" test -z "${DRYRUN}" && tar -zcf "notepadpp_${latest_version}.orig.tar.gz" "notepadpp-${latest_version}" # CLEAN UP -rm -rf "${tmpfile1}" "notepadpp-${latest_version}/" "${file_current_plugin_32_Compare}" "${file_current_plugin_32_TextFX}" "${file_current_plugin_64_Compare}" "npp.${latest_version}.bin.7z" "npp.${latest_version}.bin.x64.7z" +rm -rf "${tmpfile1}" "notepadpp-${latest_version}/" "${file_current_plugin_32_Compare}" "${file_current_plugin_32_TextFX}" "${file_current_plugin_64_Compare}" "npp.${latest_version}${fn_section}.7z" "npp.${latest_version}${fn_section}.x64.7z" -- cgit