remove basename - use standard vars defined in cconf
Signed-off-by: Nico Schottelius <nico@denkbrett.schottelius.org>
This commit is contained in:
parent
5caad132b5
commit
fef686b449
1 changed files with 9 additions and 2 deletions
11
ccollect.sh
11
ccollect.sh
|
@ -20,6 +20,13 @@
|
||||||
# Initially written for SyGroup (www.sygroup.ch)
|
# Initially written for SyGroup (www.sygroup.ch)
|
||||||
# Date: Mon Nov 14 11:45:11 CET 2005
|
# Date: Mon Nov 14 11:45:11 CET 2005
|
||||||
|
|
||||||
|
#
|
||||||
|
# Standard variables (stolen from cconf)
|
||||||
|
#
|
||||||
|
__pwd="$(pwd -P)"
|
||||||
|
__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
|
||||||
|
__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
|
||||||
|
|
||||||
#
|
#
|
||||||
# where to find our configuration and temporary file
|
# where to find our configuration and temporary file
|
||||||
#
|
#
|
||||||
|
@ -29,7 +36,7 @@ CDEFAULTS=${CCOLLECT_CONF}/defaults
|
||||||
CPREEXEC="${CDEFAULTS}/pre_exec"
|
CPREEXEC="${CDEFAULTS}/pre_exec"
|
||||||
CPOSTEXEC="${CDEFAULTS}/post_exec"
|
CPOSTEXEC="${CDEFAULTS}/post_exec"
|
||||||
|
|
||||||
TMP=$(mktemp "/tmp/$(basename $0).XXXXXX")
|
TMP=$(mktemp "/tmp/${__myname}.XXXXXX")
|
||||||
VERSION=0.7.1
|
VERSION=0.7.1
|
||||||
RELEASE="2008-04-XX"
|
RELEASE="2008-04-XX"
|
||||||
HALF_VERSION="ccollect ${VERSION}"
|
HALF_VERSION="ccollect ${VERSION}"
|
||||||
|
@ -98,7 +105,7 @@ display_version()
|
||||||
#
|
#
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
echo "$(basename $0): <interval name> [args] <sources to backup>"
|
echo "${__myname}: <interval name> [args] <sources to backup>"
|
||||||
echo ""
|
echo ""
|
||||||
echo " ccollect creates (pseudo) incremental backups"
|
echo " ccollect creates (pseudo) incremental backups"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
Loading…
Reference in a new issue