SOURCES: webapps.sh - restore webapp_applist()
glen
glen at pld-linux.org
Tue Feb 3 19:56:32 CET 2009
Author: glen Date: Tue Feb 3 18:56:32 2009 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- restore webapp_applist()
---- Files affected:
SOURCES:
webapps.sh (1.16 -> 1.17)
---- Diffs:
================================================================
Index: SOURCES/webapps.sh
diff -u SOURCES/webapps.sh:1.16 SOURCES/webapps.sh:1.17
--- SOURCES/webapps.sh:1.16 Mon Jan 5 16:04:48 2009
+++ SOURCES/webapps.sh Tue Feb 3 19:56:26 2009
@@ -49,6 +49,32 @@
done
}
+# return application list for webserver
+# useful for bash_completion parsing
+webapp_applist() {
+ local action="$1"
+ local server=$2
+
+ for app in /etc/webapps/*; do
+ [ -d $app ] || continue
+ [ -f $app/$server.conf ] || continue
+ local appname=${app##*/}
+ local link=$(webapp_link $appname)
+
+ case "$action" in
+ *-registered)
+ [ -f /etc/$server/webapps.d/$link.conf ] && echo $appname
+ ;;
+ *-unregistered)
+ [ -f /etc/$server/webapps.d/$link.conf ] || echo $appname
+ ;;
+ *)
+ echo $appname
+ ;;
+ esac
+ done
+}
+
webapp_list_apps() {
echo "available webapps"
for app in /etc/webapps/*; do
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/webapps.sh?r1=1.16&r2=1.17&f=u
More information about the pld-cvs-commit
mailing list