From 6a6185a7444e09d632024e5bd61d2bf48619d714 Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Sun, 26 Jan 2014 21:59:58 -0500 Subject: [PATCH] Added actions to manage modules (manually adding/removing symlinks for now). --- actions/module-disable | 13 +++++++++++++ actions/module-enable | 13 +++++++++++++ actions/module-list-available | 7 +++++++ actions/module-list-enabled | 9 +++++++++ 4 files changed, 42 insertions(+) create mode 100644 actions/module-disable create mode 100644 actions/module-enable create mode 100644 actions/module-list-available create mode 100644 actions/module-list-enabled diff --git a/actions/module-disable b/actions/module-disable new file mode 100644 index 000000000..cf77decce --- /dev/null +++ b/actions/module-disable @@ -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-" +case "$2" in + owncloud) + if [ -e "$1"/modules/owncloud.py ] ; then + rm -f "$1"/modules/owncloud.py + fi + ;; +esac diff --git a/actions/module-enable b/actions/module-enable new file mode 100644 index 000000000..6f7ed169f --- /dev/null +++ b/actions/module-enable @@ -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-" +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 diff --git a/actions/module-list-available b/actions/module-list-available new file mode 100644 index 000000000..626af92f1 --- /dev/null +++ b/actions/module-list-available @@ -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" diff --git a/actions/module-list-enabled b/actions/module-list-enabled new file mode 100644 index 000000000..4c378a618 --- /dev/null +++ b/actions/module-list-enabled @@ -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