37 |
addconfig " <DefaultStore>${store_uri}</DefaultStore>" |
addconfig " <DefaultStore>${store_uri}</DefaultStore>" |
38 |
else |
else |
39 |
# use the first one which gets found |
# use the first one which gets found |
40 |
for config in $(NOCOLOR=1 list_files_in_directory/${STOREFRONT_STORES_DIR}) |
for config in $(NOCOLOR=1 list_files_in_directory ${STOREFRONT_STORES_DIR}) |
41 |
do |
do |
42 |
store_uri=$(source ${config}; echo "${STORE}") |
store_uri=$(source ${config}; echo "${STORE}") |
43 |
if [[ -n ${store_uri} ]] |
if [[ -n ${store_uri} ]] |
54 |
addconfig ' <SelfSelection>True</SelfSelection>' |
addconfig ' <SelfSelection>True</SelfSelection>' |
55 |
addconfig ' <SessionWindowedMode>False</SessionWindowedMode>' |
addconfig ' <SessionWindowedMode>False</SessionWindowedMode>' |
56 |
addconfig ' <VisibleStores>' |
addconfig ' <VisibleStores>' |
57 |
for config in $(NOCOLOR=1 list_files_in_directory/${STOREFRONT_STORES_DIR}) |
for config in $(NOCOLOR=1 list_files_in_directory ${STOREFRONT_STORES_DIR}) |
58 |
do |
do |
59 |
store_uri=$(source ${config}; echo "${STORE}") |
store_uri=$(source ${config}; echo "${STORE}") |
60 |
if [[ -n ${store_uri} ]] |
if [[ -n ${store_uri} ]] |
82 |
|
|
83 |
[[ -n ${method} ]] || die "No method given" |
[[ -n ${method} ]] || die "No method given" |
84 |
|
|
85 |
|
# always create the STOREFRONT_STORES_DIR |
86 |
|
install -d "${STOREFRONT_STORES_DIR}" |
87 |
|
|
88 |
case "${method}" in |
case "${method}" in |
89 |
add) |
add) |
90 |
# requires name and store |
# requires name and store |
96 |
die "Only PNA Stores are allowed." |
die "Only PNA Stores are allowed." |
97 |
fi |
fi |
98 |
|
|
|
[ ! -d ${STOREFRONT_STORES_DIR} |
|
|
# get a proper name strore[id].conf |
|
|
|
|
99 |
store_name="$(normalize_store ${store_uri})" |
store_name="$(normalize_store ${store_uri})" |
100 |
config="${STOREFRONT_STORES_DIR}/${store_name}.conf" |
config="${STOREFRONT_STORES_DIR}/${store_name}.conf" |
101 |
CONFIG="${MROOT}/${config}" |
CONFIG="${MROOT}/${config}" |
106 |
del) |
del) |
107 |
if [[ -z ${store_uri} ]] |
if [[ -z ${store_uri} ]] |
108 |
then |
then |
109 |
for config in $(NOCOLOR=1 list_files_in_directory/${STOREFRONT_STORES_DIR}) |
for config in $(NOCOLOR=1 list_files_in_directory ${STOREFRONT_STORES_DIR}) |
110 |
do |
do |
111 |
if [ -f ${config} ] && [[ ${config/.conf} != ${config} ]] |
if [ -f ${config} ] && [[ ${config/.conf} != ${config} ]] |
112 |
then |
then |
138 |
;; |
;; |
139 |
|
|
140 |
print) |
print) |
141 |
for config in $(NOCOLOR=1 list_files_in_directory/${STOREFRONT_STORES_DIR}) |
for config in $(NOCOLOR=1 list_files_in_directory ${STOREFRONT_STORES_DIR}) |
142 |
do |
do |
143 |
store_uri=$(source ${config}; echo "${STORE}") |
store_uri=$(source ${config}; echo "${STORE}") |
144 |
rvecho "${store_uri}" |
rvecho "${store_uri}" |