Skip to content

Commit

Permalink
remove usage of eval for indirect variable assignment
Browse files Browse the repository at this point in the history
Replaced with declare.
  • Loading branch information
jhoblitt committed Sep 19, 2017
1 parent 14d95ad commit d3bb206
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/newinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ n8l::sys::osfamily() {
;;
esac

eval "$__osfamily_result=$__osfamily"
eval "$__release_result=$__release"
declare -g "$__osfamily_result"="$__osfamily"
declare -g "$__release_result"="$__release"
}

#
Expand Down Expand Up @@ -311,8 +311,8 @@ n8l::sys::platform() {
;;
esac

eval "$__platform_result=$__platform"
eval "$__target_cc_result=$__target_cc"
declare -g "$__platform_result"="$__platform"
declare -g "$__target_cc_result"="$__target_cc"
}

# http://stackoverflow.com/questions/1527049/join-elements-of-an-array#17841619
Expand Down

0 comments on commit d3bb206

Please sign in to comment.