18 |
if [[ -e ${STOREBROWSE_EXECUTABLE} ]] |
if [[ -e ${STOREBROWSE_EXECUTABLE} ]] |
19 |
then |
then |
20 |
BROWSER=${STOREBROWSE_EXECUTABLE} |
BROWSER=${STOREBROWSE_EXECUTABLE} |
21 |
ADDSTORE_REQUIERED=1 |
ADDSTORE_REQUIRED=1 |
22 |
# use old pnabrowse |
# use old pnabrowse |
23 |
elif [[ -e ${PNABROWSE_EXECUTABLE} ]] |
elif [[ -e ${PNABROWSE_EXECUTABLE} ]] |
24 |
then |
then |
25 |
BROWSER=${PNABROWSE_EXECUTABLE} |
BROWSER=${PNABROWSE_EXECUTABLE} |
26 |
ADDSTORE_REQUIERED=0 |
ADDSTORE_REQUIRED=0 |
27 |
else |
else |
28 |
echo "No Citrix browser found." |
echo "No Citrix browser found." |
29 |
exit 1 |
exit 1 |
35 |
USE_XMESSAGE=1 |
USE_XMESSAGE=1 |
36 |
fi |
fi |
37 |
|
|
38 |
|
storefront_list_store() |
39 |
|
{ |
40 |
|
"${BROWSER}" -l | cut -d"'" -f1-3 | sed "s:'::g" |
41 |
|
} |
42 |
|
|
43 |
storefront_add_store() |
storefront_add_store() |
44 |
{ |
{ |
45 |
if [[ -z $("${BROWSER}" -l "${STORE}" | grep "'${STOREFRONT_STORE}'") ]] |
if [[ -z $("${BROWSER}" -l "${STOREFRONT_STORE}" | grep "'${STOREFRONT_STORE}'") ]] |
46 |
then |
then |
47 |
"${BROWSER}" -a "${STOREFRONT_STORE}" |
"${BROWSER}" -a "${STOREFRONT_STORE}" |
48 |
else |
else |
52 |
|
|
53 |
storefront_delete_store() |
storefront_delete_store() |
54 |
{ |
{ |
55 |
if [[ -n $("${BROWSER}" -l "${STORE}" | grep "'${STOREFRONT_STORE}'") ]] |
if [[ -n $("${BROWSER}" -l "${STOREFRONT_STORE}" | grep "'${STOREFRONT_STORE}'") ]] |
56 |
then |
then |
57 |
"${BROWSER}" -d "${STOREFRONT_STORE}" |
"${BROWSER}" -d "${STOREFRONT_STORE}" |
58 |
else |
else |
95 |
case ${CMD} in |
case ${CMD} in |
96 |
enumerate) |
enumerate) |
97 |
# enumerate apps |
# enumerate apps |
98 |
if [[ ${ADDSTORE_REQUIERED} = 1 ]] |
if [[ ${ADDSTORE_REQUIRED} = 1 ]] |
99 |
then |
then |
100 |
storefront_add_store |
storefront_add_store |
101 |
fi |
fi |
111 |
|
|
112 |
" & |
" & |
113 |
fi |
fi |
114 |
if [[ ${ADDSTORE_REQUIERED} = 1 ]] |
if [[ ${ADDSTORE_REQUIRED} = 1 ]] |
115 |
then |
then |
116 |
storefront_add_store |
storefront_add_store |
117 |
storefront_subscribe_app |
storefront_subscribe_app |
144 |
fi |
fi |
145 |
;; |
;; |
146 |
|
|
147 |
|
liststore) |
148 |
|
storefront_list_store |
149 |
|
;; |
150 |
|
|
151 |
|
addstore) |
152 |
|
if [[ -n $2 ]] |
153 |
|
then |
154 |
|
STOREFRONT_STORE="$2" |
155 |
|
fi |
156 |
|
storefront_add_store |
157 |
|
;; |
158 |
|
|
159 |
|
delstore) |
160 |
|
if [[ -n $2 ]] |
161 |
|
then |
162 |
|
STOREFRONT_STORE="$2" |
163 |
|
fi |
164 |
|
storefront_delete_store |
165 |
|
;; |
166 |
|
|
167 |
*) |
*) |
168 |
echo "Unknown command '${CMD}'." |
echo "Unknown command '${CMD}'." |
169 |
exit 1 |
exit 1 |