summaryrefslogtreecommitdiff
path: root/manage-baserock
diff options
context:
space:
mode:
Diffstat (limited to 'manage-baserock')
-rwxr-xr-xmanage-baserock8
1 files changed, 4 insertions, 4 deletions
diff --git a/manage-baserock b/manage-baserock
index b3a8f52..f7cc328 100755
--- a/manage-baserock
+++ b/manage-baserock
@@ -27,7 +27,7 @@ URL="$3"
check_system_name () {
local system="$1"
local valid_chars='A-Za-z0-9_-.'
- case $system in
+ case "$system" in
*[^${valid_chars}]*)
echo "The specified name '${system}' contains invalid characters."
echo "Valid characters are ${valid_chars}."
@@ -54,7 +54,7 @@ case "${ACTION}" in
exec sudo "$0" "$@"
fi
- check_system_name $SYSTEM
+ check_system_name "$SYSTEM"
if test -d "${BASEROCK_BASE}/${SYSTEM}/baserock"; then
echo "Sorry, $SYSTEM already exists"
@@ -66,14 +66,14 @@ case "${ACTION}" in
exit 1
fi
- mkdir -p ${BASEROCK_BASE}
+ mkdir -p "${BASEROCK_BASE}"
TEMP_BASE=$(mktemp -d --tmpdir="${BASEROCK_BASE}")
cleanup () { rm -rf "${TEMP_BASE}"; }
trap cleanup 0
if test "x${URL}" = "x${URL##http://}" -a "x${URL}" = "x${URL##https://}"; then
- if ! test -e ${URL}; then
+ if ! test -e "${URL}"; then
echo "${URL} is neither a HTTP/HTTPS url nor a path to a local file";
exit 1;
fi