mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-01 01:00:03 +01:00
20 lines
575 B
Text
20 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
|