From dcf9e96aa3a3530b6f0e6afba8dc0c102b89dd51 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 02 Jul 2020 18:36:56 -0400 Subject: Prefix "static" vars with "_" --- (limited to 'src/install.sh') diff --git a/src/install.sh b/src/install.sh index 02d26d3..41c217f 100644 --- a/src/install.sh +++ b/src/install.sh @@ -18,11 +18,11 @@ # along with the ProteanOS Development Kit. If not, see # . -install_deps= -install_urls= -install_md5sums= -install_sha256sums= -install_feed_url= +_install_deps= +_install_urls= +_install_md5sums= +_install_sha256sums= +_install_feed_url= _usign_fingerprint() { @@ -52,7 +52,7 @@ _install_deps_cb() local deps="${2}" shift 2 - install_deps="${install_deps}${pkg}: ${deps}${LF}" + _install_deps="${_install_deps}${pkg}: ${deps}${LF}" return 0 } @@ -63,8 +63,8 @@ _install_fname_cb() local fname="${2}" shift 2 - install_urls="$(printf '%s\n%s %s/%s' "${install_urls}" \ - "${pkg}" "${install_feed_url}" "${fname}")" + _install_urls="$(printf '%s\n%s %s/%s' "${_install_urls}" \ + "${pkg}" "${_install_feed_url}" "${fname}")" return 0 } @@ -75,7 +75,7 @@ _install_md5sum_cb() local md5sum="${2}" shift 2 - install_md5sums="$(printf '%s\n%s %s' "${install_md5sums}" \ + _install_md5sums="$(printf '%s\n%s %s' "${_install_md5sums}" \ "${pkg}" "${md5sum}")" return 0 @@ -87,8 +87,8 @@ _install_sha256sum_cb() local sha256sum="${2}" shift 2 - install_sha256sums="$(printf '%s\n%s %s' \ - "${install_sha256sums}" "${pkg}" "${sha256sum}")" + _install_sha256sums="$(printf '%s\n%s %s' \ + "${_install_sha256sums}" "${pkg}" "${sha256sum}")" return 0 } @@ -119,10 +119,10 @@ install_find_pkgs() fi opkg_conf_fd=${FD} - install_deps= - install_urls= - install_md5sums= - install_sha256sums= + _install_deps= + _install_urls= + _install_md5sums= + _install_sha256sums= if ! fopen "${root}/.prokit/packages" 'w'; then return 1 @@ -167,7 +167,7 @@ install_find_pkgs() ${gzip} "${root}"; then return 1 fi - install_feed_url="${base_url}" + _install_feed_url="${base_url}" feed_find_pkgs \ "${root}/$(profile_opkg_state_dir)/lists/${name}" \ "$(profile_dep_fields)" profile_include_pkg \ @@ -184,7 +184,7 @@ install_find_pkgs() fclose ${pkgs_fd} pkgs="$(resolve_deps "$(cat -- "${root}/.prokit/packages")" \ - "${install_deps}" | xargs printf '%s\n' | sort -u)" + "${_install_deps}" | xargs printf '%s\n' | sort -u)" printf '%s\n' "${pkgs}" >"${root}/.prokit/packages" return 0 @@ -218,11 +218,11 @@ install_get_pkgs() for pkg in $(cat -- "${root}/.prokit/packages"); do info "$(get_msg 'install_downloading_pkg')" "${pkg}" - url="$(printf '%s\n' "${install_urls}" | \ + url="$(printf '%s\n' "${_install_urls}" | \ sed -n "s/^${pkg} //p")" - md5sum="$(printf '%s\n' "${install_md5sums}" | \ + md5sum="$(printf '%s\n' "${_install_md5sums}" | \ sed -n "s/^${pkg} //p")" - sha256sum="$(printf '%s\n' "${install_sha256sums}" | \ + sha256sum="$(printf '%s\n' "${_install_sha256sums}" | \ sed -n "s/^${pkg} //p")" fname="var/cache/opkg/archives/${url##*/}" if ! ${WGET} -q -O "${root}/${fname}" -- "${url}"; then -- cgit v0.9.1