diff options
author | Joseph Hunkeler <jhunk@stsci.edu> | 2015-01-05 14:49:29 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunk@stsci.edu> | 2015-01-05 14:49:29 -0500 |
commit | 7af500421ae18f11c0261cd99442f2ea8ea3f259 (patch) | |
tree | f9095e644e322f7114ac4e73358af2f09e32dafe | |
parent | 13918acf5d6104fd696175d682b4300e42b9159b (diff) | |
download | pkg_creator-master.tar.gz |
-rw-r--r-- | common.inc | 11 | ||||
-rwxr-xr-x | pkg_create | 1 | ||||
-rwxr-xr-x | pkg_init | 2 |
3 files changed, 12 insertions, 2 deletions
@@ -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 } @@ -8,6 +8,7 @@ PKG_ROOT="$_PKG_ROOT/root" PKG_SCRIPTS="$_PKG_ROOT/scripts" init_vars +init_pkgbuild if [ -z "$PKG_NAME" ]; then @@ -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 |