Skip to content

Commit

Permalink
Merge pull request #33 from ZOSOpenTools/meta_updateitself
Browse files Browse the repository at this point in the history
Add code to setup.sh for meta to refresh the zopen-config
  • Loading branch information
IgorTodorovskiIBM authored Nov 27, 2023
2 parents ff81f81 + 9d5afd7 commit 5271018
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions buildenv
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export ZOPEN_DEV_DEPS="git gzip make tar bash zoslib help2man perl curl grep gro
export ZOPEN_CONFIGURE="skip"
export ZOPEN_MAKE="skip"
export ZOPEN_CHECK="zopen_check"
export ZOPEN_INSTALL="zopen_install"

META_DEV_DIR="${PWD}/meta"
if [ -z "${ZOPEN_META_DEV_ROOT}" ] ; then
Expand All @@ -17,9 +18,7 @@ if [ -z "${ZOPEN_META_DEV_ROOT}" ] ; then
exit 8
fi
fi
export ZOPEN_INSTALL="zopen_install"
else
export ZOPEN_INSTALL='skip'
echo "Installation will not be performed - testing dev environment"

if ! [ -d "${ZOPEN_META_DEV_ROOT}" ] ; then
Expand Down Expand Up @@ -119,8 +118,10 @@ zopen_install()
return 8
fi
mkdir -p "$ZOPEN_INSTALL_DIR"
rm -rvf "$PWD/zotsampleport"
rm -rvf "$PWD/.git"* "$PWD/.editorconfig"
if [ -z "$ZOPEN_META_DEV_ROOT" ]; then
rm -rvf "$PWD/zotsampleport"
rm -rvf "$PWD/.git"* "$PWD/.editorconfig"
fi
cp -rv $PWD/* $ZOPEN_INSTALL_DIR/
mkdir -p "$ZOPEN_INSTALL_DIR/man/man1"
zopen-help2man "$ZOPEN_INSTALL_DIR/man/man1"
Expand All @@ -136,6 +137,9 @@ zopen_install()
}

zopen_append_to_setup() {
cat <<ZZ
\$PWD/bin/zopen init --refresh
ZZ
}

zopen_get_version()
Expand Down
2 changes: 1 addition & 1 deletion tests/zopen_check_basic_install
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ echo "Rc=$?"
echo "Testing if zopen was installed at: ${zopenenv}/usr/local/zopen"
[ ! -e "${zopenenv}/usr/local/zopen" ] && echo "File system not available" && exit 8
echo "Testing source of the zopen-config file"
[ ! -e "${zopenenv}/etc/zopen-config" ] && echo "xopen configuration not available" && exit 8
[ ! -e "${zopenenv}/etc/zopen-config" ] && echo "zopen configuration not available" && exit 8

echo "Testing source of configuration file"
# shellcheck disable=SC1091
Expand Down

0 comments on commit 5271018

Please sign in to comment.