Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/modules/citrix/storefront-resolver.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2352 by niro, Mon Aug 24 11:03:25 2015 UTC revision 2356 by niro, Mon Aug 24 14:11:26 2015 UTC
# Line 18  fi Line 18  fi
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
# Line 35  then Line 35  then
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
# Line 47  storefront_add_store() Line 52  storefront_add_store()
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
# Line 90  storefront_launch() Line 95  storefront_launch()
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
# Line 106  case ${CMD} in Line 111  case ${CMD} in
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
# Line 139  case ${CMD} in Line 144  case ${CMD} in
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

Legend:
Removed from v.2352  
changed lines
  Added in v.2356