You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#!/bin/bash ## compose: no-hooks
if [ -z "$SERVICE_DATASTORE" ]; then echo "This script is meant to be run through 'compose' to work properly." >&2 exit 1 fi
version=0.1 usage="$exname [-h|--help] PAD_ID" help=" USAGE:
$usage
DESCRIPTION:
Delete pad identified by PAD_ID
EXAMPLES:
$exname list
"
while [ "$1" ]; do case "$1" in "--help"|"-h") print_help >&2 exit 0 ;; --*|-*) err "Unexpected optional argument '$1'" print_usage >&2 exit 1 ;; *) [ -z "$PAD_ID" ] && { PAD_ID="$1" ; shift ; continue ; } err "Unexpected positional argument '$1'" print_usage >&2 exit 1 ;; esac shift done
. "$CHARM_PATH"/lib/common
set -e
if [ -z "$PAD_ID" ]; then err "Missing first positional argument PAD_ID to specify which pad to drop." print_usage exit 1 fi
etherpad:api:init || exit 1
etherpad:api deletePad --data-urlencode "padID=${PAD_ID}" >/dev/null || exit 1
|