summaryrefslogtreecommitdiff
path: root/functions/stagefile.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:49 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:18:29 +0100
commitda353a5231ad925013d01065768864307c70651a (patch)
tree589606906e4e8966797f352ec63162cbb4016da0 /functions/stagefile.sh
parent068a51b175546dfeac45c747236817cb41db50d7 (diff)
downloadlive-build-da353a5231ad925013d01065768864307c70651a.zip
live-build-da353a5231ad925013d01065768864307c70651a.tar.gz
Adding live-helper 1.0~a4-1.
Diffstat (limited to 'functions/stagefile.sh')
-rwxr-xr-xfunctions/stagefile.sh28
1 files changed, 14 insertions, 14 deletions
diff --git a/functions/stagefile.sh b/functions/stagefile.sh
index d9d6503..a5879f5 100755
--- a/functions/stagefile.sh
+++ b/functions/stagefile.sh
@@ -11,19 +11,19 @@ set -e
Check_stagefile ()
{
- STAGEFILE="${1}"
- STAGENAME="`basename ${1}`"
+ FILE="${1}"
+ NAME="`basename ${1}`"
# Checking stage file
- if [ -f "${STAGEFILE}" ]
+ if [ -f "${FILE}" ]
then
if [ "${FORCE}" = "true" ]
then
# Forcing execution
- rm -f "${STAGEFILE}"
+ rm -f "${FILE}"
else
# Skipping execution
- echo "W: skipping ${STAGENAME}"
+ Echo_warning "skipping ${NAME}"
exit 0
fi
fi
@@ -31,28 +31,28 @@ Check_stagefile ()
Create_stagefile ()
{
- STAGEFILE="${1}"
- STAGEDIRECTORY="`dirname ${1}`"
+ FILE="${1}"
+ DIRECTORY="`dirname ${1}`"
# Creating stage directory
- if [ ! -d "${STAGEDIRECTORY}" ]
+ if [ ! -d "${DIRECTORY}" ]
then
- mkdir -p "${STAGEDIRECTORY}"
+ mkdir -p "${DIRECTORY}"
fi
# Creating stage file
- touch "${STAGEFILE}"
+ touch "${FILE}"
}
Require_stagefile ()
{
- STAGEFILE="${1}"
- STAGENAME="`basename ${1}`"
+ FILE="${1}"
+ NAME="`basename ${1}`"
# Checking stage file
- if [ ! -f "${STAGEFILE}" ]
+ if [ ! -f "${FILE}" ]
then
- echo "E: ${STAGENAME} missing"
+ Echo_error "${NAME} missing"
exit 1
fi
}