Added actions to manage modules (manually adding/removing symlinks for now).

This commit is contained in:
James Valleroy 2014-01-26 21:59:58 -05:00
parent cb9ca1b86c
commit 6a6185a744
4 changed files with 42 additions and 0 deletions

13
actions/module-disable Normal file
View File

@ -0,0 +1,13 @@
#!/bin/sh
# Usage: module-disable python_root module
# This will change when we switch to using aptitude.
# TODO: Replace this with "aptitude purge plinth-<module>"
case "$2" in
owncloud)
if [ -e "$1"/modules/owncloud.py ] ; then
rm -f "$1"/modules/owncloud.py
fi
;;
esac

13
actions/module-enable Normal file
View File

@ -0,0 +1,13 @@
#!/bin/sh
# Usage: module-enable python_root module
# This will change when we switch to using aptitude.
# TODO: Replace this with "aptitude install plinth-<module>"
case "$2" in
owncloud)
if [ ! -e "$1"/modules/owncloud.py ] ; then
ln -s "$1"/modules/installed/apps/owncloud.py "$1"/modules/owncloud.py
fi
;;
esac

View File

@ -0,0 +1,7 @@
#!/bin/sh
# Usage: module-list-available python_root
# This will change when we switch to using aptitude.
# TODO: Replace this with something like "aptitude search -F %p plinth-"
echo "owncloud"

View File

@ -0,0 +1,9 @@
#!/bin/sh
# Usage: module-list-enabled python_root
# This will change when we switch to using aptitude.
# TODO: Replace this with something like 'aptitude search -F %p | grep "plinth-"'
if [ -e "$1"/modules/owncloud.py ] ; then
echo "owncloud"
fi