mathics-create-database 575 B

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