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/profile.sh') diff --git a/src/profile.sh b/src/profile.sh index 2e1bff0..0af1935 100644 --- a/src/profile.sh +++ b/src/profile.sh @@ -18,15 +18,15 @@ # along with the ProteanOS Development Kit. If not, see # . -profiles=' ' -profile= +_profiles=' ' +_profile= register_profile() { local profile="${1}" shift 1 - profiles="${profiles}${profile} " + _profiles="${_profiles}${profile} " return 0 } @@ -35,7 +35,7 @@ is_profile() local prof="${1}" shift 1 - case "${profiles}" in *" ${prof} "*) return 0;; *) return 1;; esac + case "${_profiles}" in *" ${prof} "*) return 0;; *) return 1;; esac } profile_set() @@ -44,7 +44,7 @@ profile_set() shift 1 if is_profile "${prof}"; then - profile="${prof}" + _profile="${prof}" else error "$(get_msg 'profile_not_found')" "${prof}" return 1 @@ -58,9 +58,9 @@ profile_detect() local root="${1}" shift 1 - for prof in ${profiles}; do + for prof in ${_profiles}; do if "prof_${prof}_detect_root" "${root}"; then - profile="${prof}" + _profile="${prof}" return 0 fi done @@ -75,5 +75,5 @@ for func in normalize_suite detect_arch default_plat select_mirror \ file_systems_mounted bind_mount bind_umount \ configure_system_native configure_system_foreign find_kernel \ make_initramfs; do - eval "profile_${func}() { \"prof_\${profile}_${func}\" \"\${@}\"; }" + eval "profile_${func}() { \"prof_\${_profile}_${func}\" \"\${@}\"; }" done -- cgit v0.9.1