From 7af500421ae18f11c0261cd99442f2ea8ea3f259 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 5 Jan 2015 14:49:29 -0500 Subject: Fix non-generating scripts. --- common.inc | 11 +++++++++-- pkg_create | 1 + pkg_init | 2 ++ 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 -- cgit