Skip to content

Commit

Permalink
Merge pull request #335 from sot/perl_deps
Browse files Browse the repository at this point in the history
Add checks for skare3 perl and deps in launchers
  • Loading branch information
jeanconn authored Sep 20, 2019
2 parents 63feaf5 + 5ae1e6a commit 0e10242
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
20 changes: 19 additions & 1 deletion sandbox_starcheck
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
#!/bin/bash

DIR=`dirname $0`
export PYTHONPATH=$DIR:$PYTHONPATH

PYTHON_EXE=`which python`
PYTHON_DIR=`dirname $PYTHON_EXE`
export PYTHONHOME=`dirname $PYTHON_DIR`
export PYTHONPATH=$DIR:$PYTHONPATH

# Check for skare3 perl
if [[ ! -f ${PYTHONHOME}/bin/perl ]];
then
echo "skare3 perl not installed. conda install perl perl-core-deps perl-ska-classic"
exit 1
fi
# Check for perl deps
perl -e "use IO::All; use Time::DayOfYear;"
if [[ $? -ne 0 ]];
then
echo "****"
echo "Missing starcheck ska3 perl dependencies. Please 'conda install perl perl-core-deps perl-ska-classic'"
echo "****"
exit 1
fi

PERL_INLINE_DIRECTORY=`mktemp -d -t starcheck_inline.XXXXXX` || exit 1
export PERL_INLINE_DIRECTORY
perl -I ${DIR}/starcheck/src/lib ${DIR}/starcheck/src/starcheck.pl "$@"
Expand Down
17 changes: 17 additions & 0 deletions starcheck/src/starcheck
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@
# for flight starcheck
unset PYTHONPATH
export PYTHONHOME=$SKA

# Check for skare3 perl
if [[ ! -f ${PYTHONHOME}/bin/perl ]];
then
echo "skare3 perl not installed. conda install perl perl-core-deps perl-ska-classic"
exit 1
fi
# Check for perl deps
perl -e "use IO::All; use Time::DayOfYear;"
if [[ $? -ne 0 ]];
then
echo "****"
echo "Missing starcheck ska3 perl dependencies. Please 'conda install perl perl-core-deps perl-ska-classic'"
echo "****"
exit 1
fi

PERL_INLINE_DIRECTORY=`mktemp -d -t starcheck_inline.XXXXXX` || exit 1
export PERL_INLINE_DIRECTORY
STARCHECK=`python -c 'import starcheck; print(starcheck.__path__[0])'`
Expand Down

0 comments on commit 0e10242

Please sign in to comment.