summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwgetpaste22
1 files changed, 11 insertions, 11 deletions
diff --git a/wgetpaste b/wgetpaste
index b5c3553..50cb4d0 100755
--- a/wgetpaste
+++ b/wgetpaste
@@ -104,13 +104,13 @@ INDENTATION=14
show_services() {
echo 'Services supported (case sensitive):'
- for index in ${!SERVICES[*]}; do
+ for index in ${SERVICES[*]}; do
echo " ${SERVICES[index]} "$'\e'"[${INDENTATION}G- ${SERVICE_URLS[index]}"
done
}
verify_service() {
- for index in ${!SERVICES[*]}; do
+ for index in ${SERVICES[*]}; do
[[ "$*" == "${SERVICES[index]}" ]] && return 0
done
fail "$*" "service" "show_services"
@@ -141,7 +141,7 @@ show_languages() {
echo "Languages supported by ${SERVICE}: $(get_recipient) (case sensitive):"
case "${SERVICE}" in
ca | rafb | stgraber )
- for index in $(eval "echo \${!${SERVICE}_LANGUAGES[*]}"); do
+ for index in $(eval "echo \${${SERVICE}_LANGUAGES[*]}"); do
echo " $(eval "echo \${${SERVICE}_LANGUAGES[index]}")"
done | sort
;;
@@ -156,18 +156,18 @@ verify_language() {
case "${SERVICE}" in
ca )
let "i = 0"
- for index in ${!ca_LANGUAGES[*]}; do
+ for index in ${ca_LANGUAGES[*]}; do
let "i = i +1"
[[ "${LANGUAGE}" == "${ca_LANGUAGES[index]}" ]] && LANGUAGE="${i}" && return 0
done
;;
rafb )
- for index in ${!rafb_LANGUAGES[*]}; do
+ for index in ${rafb_LANGUAGES[*]}; do
[[ "${LANGUAGE}" == "${rafb_LANGUAGES[index]}" ]] && return 0
done
;;
stgraber )
- for index in ${!stgraber_LANGUAGES[*]}; do
+ for index in ${stgraber_LANGUAGES[*]}; do
[[ "${LANGUAGE}" == "${stgraber_LANGUAGES[index]}" ]] && LANGUAGE="${stgraber_LANGUAGE_VALUES[index]}" && return 0
done
;;
@@ -192,7 +192,7 @@ show_expiration_options() {
echo "Expiration options supported by ${SERVICE}: $(get_recipient) (case sensisitive):"
case "${SERVICE}" in
ca | stgraber )
- for index in $(eval "echo \${!${SERVICE}_EXPIRATION_OPTIONS[*]}"); do
+ for index in $(eval "echo \${${SERVICE}_EXPIRATION_OPTIONS[*]}"); do
echo " $(eval "echo \${${SERVICE}_EXPIRATION_OPTIONS[index]}")"
done
;;
@@ -211,12 +211,12 @@ show_expiration_options() {
verify_expiration_options() {
case "${SERVICE}" in
ca )
- for index in ${!ca_EXPIRATION_OPTIONS[*]}; do
+ for index in ${ca_EXPIRATION_OPTIONS[*]}; do
[[ "${EXPIRATION}" == "${ca_EXPIRATION_OPTIONS[index]}" ]] && return 0
done
;;
stgraber )
- for index in ${!stgraber_EXPIRATION_OPTIONS[*]}; do
+ for index in ${stgraber_EXPIRATION_OPTIONS[*]}; do
[[ "${EXPIRATION}" == "${stgraber_EXPIRATION_OPTIONS[index]}" ]] && EXPIRATION="${stgraber_EXPIRATION_VALUES[index]}" && return 0
done
;;
@@ -232,11 +232,11 @@ verify_expiration_options() {
# get the url to post to for any given service
get_recipient() {
if [[ "${1}" == "raw" ]]; then
- for index in ${!SERVICES[*]}; do
+ for index in ${SERVICES[*]}; do
[[ "${SERVICE}" == "${SERVICES[index]}" ]] && echo "${SERVICE_URLS_RAW[index]}" && return 0
done
else
- for index in ${!SERVICES[*]}; do
+ for index in ${SERVICES[*]}; do
[[ "${SERVICE}" == "${SERVICES[index]}" ]] && echo "${SERVICE_URLS[index]}" && return 0
done
fi