Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made variables local to the plugin #27

Merged
merged 1 commit into from
Oct 7, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions plugins/check-find.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/")

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions plugins/check-ldd.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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' ':')
Expand Down
2 changes: 1 addition & 1 deletion plugins/check-md5sum.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/" |
Expand Down
4 changes: 2 additions & 2 deletions plugins/check-symlinks.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions plugins/download-generic.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions plugins/optimize-wrappers.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions plugins/postbuild-generic.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 ($@)"
Expand Down
2 changes: 1 addition & 1 deletion plugins/postbuild-sanity.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_sanity_post_build()
{
(
local TESTS PATTERN SEVERITY REASON
local IFS TESTS PATTERN SEVERITY REASON

IFS=$'\n'

Expand Down
1 change: 1 addition & 0 deletions plugins/verify-md5.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions plugins/verify-sha1.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions plugins/verify-sha256.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down