summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common.inc11
-rwxr-xr-xpkg_create1
-rwxr-xr-xpkg_init2
3 files changed, 12 insertions, 2 deletions
diff --git a/common.inc b/common.inc
index f56290b..4be23ec 100644
--- a/common.inc
+++ b/common.inc
@@ -30,9 +30,16 @@ function readlink_ex
echo $script_location
}
-function init_vars
+function init_pkgbuild
{
- scripts_default=( preinstall postinstall )
PKGBUILD_CMD="pkgbuild"
PKGBUILD_ARGS="--scripts $PKG_SCRIPTS --identifier edu.stsci.$PKG_NAME.pkg --root $PKG_ROOT"
+ export PKGBUILD_CMD
+ export PKGBUILD_ARGS
+}
+
+function init_vars
+{
+ scripts_default=( preinstall postinstall )
+ export scripts_default
}
diff --git a/pkg_create b/pkg_create
index 4297f38..aceb145 100755
--- a/pkg_create
+++ b/pkg_create
@@ -8,6 +8,7 @@ PKG_ROOT="$_PKG_ROOT/root"
PKG_SCRIPTS="$_PKG_ROOT/scripts"
init_vars
+init_pkgbuild
if [ -z "$PKG_NAME" ]; then
diff --git a/pkg_init b/pkg_init
index 36a497f..d050835 100755
--- a/pkg_init
+++ b/pkg_init
@@ -7,6 +7,8 @@ _PKG_ROOT="$_ROOT/$PKG_NAME"
PKG_ROOT="$_PKG_ROOT/root"
PKG_SCRIPTS="$_PKG_ROOT/scripts"
+init_vars
+
if [ -z "$PKG_NAME" ]; then
echo Please give your package a name.
exit 1