diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-07-02 18:36:56 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-07-02 18:36:56 (EDT) |
commit | dcf9e96aa3a3530b6f0e6afba8dc0c102b89dd51 (patch) | |
tree | 7cc6010e62dc3800b085d46783630fbe0573737a /src/profile.sh | |
parent | 6adc62fcdae9d61358ce6fc9fae919d5cbc75156 (diff) |
Prefix "static" vars with "_"
Diffstat (limited to 'src/profile.sh')
-rw-r--r-- | src/profile.sh | 16 |
1 files changed, 8 insertions, 8 deletions
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 # <http://www.gnu.org/licenses/>. -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 |