diff options
author | David Melik <dchmelik@gmail.com> | 2015-07-15 00:50:34 +0700 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2015-07-16 10:57:22 -0500 |
commit | 111f4c18e6c2fcc2ef7bc90c19d46c5a801810b3 (patch) | |
tree | a8a3091839d98f2d13cfdd9bc9f8a45893b6fa8a /academic/mathics/mathics-create-database | |
parent | 0cddda1267c2110c10c0d1f5e60f6a3c0357ae79 (diff) | |
download | slackbuilds-111f4c18e6c2fcc2ef7bc90c19d46c5a801810b3.tar.gz |
academic/mathics: Added (computer algebra system).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic/mathics/mathics-create-database')
-rw-r--r-- | academic/mathics/mathics-create-database | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/academic/mathics/mathics-create-database b/academic/mathics/mathics-create-database new file mode 100644 index 0000000000..62f39a9b01 --- /dev/null +++ b/academic/mathics/mathics-create-database @@ -0,0 +1,19 @@ +# 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 |