Skip to content

Made variables local to the plugin #27

Merged
merged 1 commit into from Oct 7, 2012
View
9 plugins/check-find.plugin
@@ -12,6 +12,7 @@
plugin_module_check_find() {
+ local MODULE VERSION I_LOG FIND_STATUS IFS_OLD IFS LOG ITEM
if [ "$FIND_CHECK" == "off" ] ; then
return 2
fi
@@ -24,8 +25,7 @@ plugin_module_check_find() {
if [ -e "$I_LOG" ]; then
IFS_OLD="$IFS"
- export IFS="
-"
+ export IFS=$'\n'
LOG=$(cat "$I_LOG" | grep "/bin/\|/games/\|/include/\|/lib/\|/sbin/" | grep -v "/doc/\|/etc/\|/fonts/\|/man/\|/var/")
@@ -39,10 +39,7 @@ plugin_module_check_find() {
fi
done
else
- (
- export IFS="$IFS_OLD"
- message "${MODULE_COLOR}${MODULE}${PROBLEM_COLOR} is missing an install log.${DEFAULT_COLOR}"
- )
+ message "${MODULE_COLOR}${MODULE}${PROBLEM_COLOR} is missing an install log.${DEFAULT_COLOR}"
FIND_STATUS=1
fi
return $FIND_STATUS
View
4 plugins/check-ldd.plugin
@@ -11,6 +11,7 @@
plugin_module_check_ldd() {
+ local MODULE VERSION I_LOG LDD_STATUS IFS_OLD IFS NEW_LD LOG FILE
if [ "$LDD_CHECK" == "off" ]; then
return 2
fi
@@ -23,8 +24,7 @@ plugin_module_check_ldd() {
if [ -e "$I_LOG" ]; then
IFS_OLD="$IFS"
- export IFS="
-"
+ export IFS=$'\n'
# fast-construct per-module LD path including all /lib/ like directories
NEW_LD=$(cat "$I_LOG" | grep "/lib/" | files | sed 's/\(.*\)\/\([^\/]*\)$/\1/g' | uniq | tr '\n' ':')
View
2 plugins/check-md5sum.plugin
@@ -12,6 +12,7 @@
plugin_module_check_md5sum() {
+ local MODULE VERSION MD5_LOG MD5SUM_STATUS IFS LINE FILE
# return CONTINUE if we're disabled
if [ "$MD5SUM_CHECK" == "off" ]; then
return 2
@@ -25,7 +26,6 @@ plugin_module_check_md5sum() {
MD5SUM_STATUS=2
if [ -e "$MD5_LOG" ]; then
- IFS_OLD="$IFS"
export IFS=$'\t\n'
cat "$MD5_LOG" | grep "/bin/\|/games/\|/include/\|/lib/\|/sbin/" |
View
4 plugins/check-symlinks.plugin
@@ -12,6 +12,7 @@
plugin_module_check_symlinks() {
+ local MODULE VERSION I_LOG IFS_OLD IFS ITEM TRAGET
# return CONTINUE if we're disabled
if [ "$SYM_CHECK" == "off" ]; then
return 2
@@ -24,8 +25,7 @@ plugin_module_check_symlinks() {
if [ -e "$I_LOG" ]; then
IFS_OLD="$IFS"
- export IFS="
-"
+ export IFS=$'\n'
cat "$I_LOG" | while read ITEM ; do
if [ -h "$ITEM" ] && [ -f "$ITEM" ] ; then
View
1 plugins/download-generic.plugin
@@ -11,6 +11,7 @@
plugin_source_download_generic() {
+ local URL TMP_FILE
# check if we can handle this type of URL:
if [ ${1:0:7} != "http://" -a ${1:0:8} != "https://" -a ${1:0:6} != "ftp://" ]; then
return 2
View
1 plugins/optimize-wrappers.plugin
@@ -20,6 +20,7 @@ plugin_wrappers_optimize()
plugin_wrappers_optimize_menu()
{
+ local IFS TITLE RESULT
# The main code calls this function WITHOUT $1 to find out which
# compiler optimization plugins exist. It then returns the version
# number which will be saved in $LUNAR_COMPILER as the user's
View
2 plugins/postbuild-generic.plugin
@@ -27,6 +27,7 @@ plugin_services_post_build()
gather_docs()
{
+ local DOC_DIR FILE
# function : gather_docs
# usage : gather_docs LIST OF FILES
# purpose : Installs extra documentation that came with the
@@ -60,6 +61,7 @@ gather_docs()
plugin_postbuild_gather_docs()
{
+ local DOC_DIR DEFAULT_DOCS
# pre-conditions : user must have $GARBAGE="on" to have any
# of this actually happen.
debug_msg "plugin_postbuild_gather_docs ($@)"
View
2 plugins/postbuild-sanity.plugin
@@ -14,7 +14,7 @@
plugin_sanity_post_build()
{
(
- local TESTS PATTERN SEVERITY REASON
+ local IFS TESTS PATTERN SEVERITY REASON
IFS=$'\n'
View
1 plugins/verify-md5.plugin
@@ -11,6 +11,7 @@
plugin_source_verify_md5() {
+ local TMP_MD5
# check if we can handle this type of VFY:
if [ "${2:0:4}" != "md5:" ] ; then
return 2
View
1 plugins/verify-sha1.plugin
@@ -11,6 +11,7 @@
plugin_source_verify_sha1() {
+ local TMP_MD5
# check if we can handle this type of VFY:
if [ "${2:0:5}" != "sha1:" ] ; then
return 2
View
1 plugins/verify-sha256.plugin
@@ -12,6 +12,7 @@
plugin_source_verify_sha256() {
+ local TMP_SHA
# check if we can handle this type of VFY:
if [ "${2:0:7}" != "sha256:" ] ; then
return 2
Something went wrong with that request. Please try again.