SlackBuildsOrg/academic/mathics/mathics-create-database
David Melik 111f4c18e6 academic/mathics: Added (computer algebra system).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2015-07-16 10:57:22 -05:00

19 lines
575 B
Text

# created by Urchlay
#!/bin/sh
if [ -z "$HOME" ]; then
echo "$0: \$HOME not set in the environment, aborting" 1>&2
exit 1
fi
DBDIR="$HOME/.local/var/mathics/"
# In case of multiple installs, SCRIPT prefers /usr/lib64 to /usr/lib,
# and higher-numbered python versions to lower-numbered. But this is
# just paranoia, there shouldn't be multiple mathics installations.
SCRIPT=$( /bin/ls -d /usr/lib*/python2.*/site-packages/mathics/manage.py | tac | head -1 )
echo "Initializing mathics SQLite databases in $DBDIR"
mkdir -p $DBDIR
exec python $SCRIPT syncdb --noinput