mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
111f4c18e6
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
19 lines
575 B
Text
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
|