Permalink
Browse files

clean package exports, less warnings

  • Loading branch information...
mpapis committed May 2, 2012
1 parent a2306c0 commit 3f5e25ee9eb17dbd111b15aab6ef2c6003dcc5de
Showing with 50 additions and 18 deletions.
  1. +47 −8 core/internal/shell/package/functions
  2. +3 −10 core/internal/shell/package/initialize
@@ -387,13 +387,6 @@ __sm.package.set.cc()
fi
}
-__sm.package.exports()
-{
- export package_name packages_path package_name package_version archive_format \
- package_file package_url package_checksum_url packages_path bin_path source_path \
- LDFLAGS CFLAGS package_default_version
-}
-
__sm.package.common.methods()
{
typeset method
@@ -604,6 +597,49 @@ __sm.package.usage()
"
}
+__sm.package.exports()
+{
+ typeset variable
+ typeset -a variables
+
+ variables=(
+ archive_format
+ bin_path
+ configure_command
+ data_path
+ extension_patches_path
+ force_flag
+ package_base_url
+ package_checksum
+ package_checksum_url
+ package_dir
+ package_directory
+ package_docs_url
+ package_file
+ package_name
+ package_patches_url
+ packages_path
+ package_url
+ package_user
+ package_version
+ shared_flag
+ source_path
+ src_path
+ static_flag
+ target_path
+ CFLAGS
+ CPATH
+ LDFLAGS
+ )
+
+ for variable in ${variables[@]}
+ do
+ typeset -g ${variable}
+ done
+
+ typeset -ga configure_flags make_flags package_dependencies
+}
+
__sm.package.reset()
{
typeset variable
@@ -612,6 +648,7 @@ __sm.package.reset()
variables=(
archive_format
bin_path
+ configure_command
configure_flags
data_path
force_flag
@@ -639,13 +676,15 @@ __sm.package.reset()
static_flag
target_path
website_url
- LDFLAGS
CFLAGS
CPATH
+ LDFLAGS
)
for variable in ${variables[@]}
do
unset ${variable}
done
+
+ __sm.package.exports
}
@@ -1,13 +1,6 @@
#!/bin/sh
-typeset -g \
- src_path data_path package_user package_version package_base_url \
- package_file package_directory archive_format package_checksum force_flag \
- static_flag shared_flag package_user configure_flags configure_command \
- package_name package_dir package_url package_docs_url package_patches_url \
- package_checksum_url bin_path packages_path source_path target_path \
- archive_format extension_patches_path
-
-typeset -ga \
- configure_flags make_flags package_dependencies fhs_dirs
+__sm.package.exports
+typeset -g packages_path extension_patches_path
+typeset -ga fhs_dirs

0 comments on commit 3f5e25e

Please sign in to comment.