[Lunar-commits] <lunar> Made variables local to the plugin
Peter de Ridder
peter at lunar-linux.org
Sat Oct 6 01:36:50 CEST 2012
commit 2c8d9a18a52ea146800867e2dc16dc56080dd37e
Author: Peter de Ridder <peter at lunar-linux.org>
Date: Fri, 05 Oct 2012 16:36:50 -0700
URL: https://github.com/lunar-linux/lunar/commit/2c8d9a18a52ea146800867e2dc16dc56080dd37e
Made variables local to the plugin
---
plugins/check-find.plugin | +3/-6
plugins/check-ldd.plugin | +2/-2
plugins/check-md5sum.plugin | +1/-1
plugins/check-symlinks.plugin | +2/-2
plugins/download-generic.plugin | +1/-0
plugins/optimize-wrappers.plugin | +1/-0
plugins/postbuild-generic.plugin | +2/-0
plugins/postbuild-sanity.plugin | +1/-1
plugins/verify-md5.plugin | +1/-0
plugins/verify-sha1.plugin | +1/-0
plugins/verify-sha256.plugin | +1/-0
11 files changed, 16 insertions(+), 12 deletions(-)
--- a/plugins/check-find.plugin
+++ b/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
--- a/plugins/check-ldd.plugin
+++ b/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' ':')
--- a/plugins/check-md5sum.plugin
+++ b/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/" |
--- a/plugins/check-symlinks.plugin
+++ b/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
--- a/plugins/download-generic.plugin
+++ b/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
--- a/plugins/optimize-wrappers.plugin
+++ b/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
--- a/plugins/postbuild-generic.plugin
+++ b/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 ($@)"
--- a/plugins/postbuild-sanity.plugin
+++ b/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'
--- a/plugins/verify-md5.plugin
+++ b/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
--- a/plugins/verify-sha1.plugin
+++ b/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
--- a/plugins/verify-sha256.plugin
+++ b/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
More information about the Lunar-commits
mailing list