summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlocalcowbuilder-create16
1 files changed, 10 insertions, 6 deletions
diff --git a/localcowbuilder-create b/localcowbuilder-create
index 7222ae4..94264c0 100755
--- a/localcowbuilder-create
+++ b/localcowbuilder-create
@@ -4,7 +4,12 @@ set -e
PRG=$(basename "$0")
-function showhelp() {
+exit() {
+ echo "ERROR: $1"
+ exit 1
+}
+
+showhelp() {
cat <<EOF
Usage: $PRG POOL [ DISTRIBUTION [ OTHERMIRROR] ]
@@ -16,7 +21,7 @@ EOF
if [ $# -eq 0 ]; then
showhelp
- exit 1
+ exit1 "not enough parameters"
fi
pool=$1
@@ -46,10 +51,9 @@ if [ "$makepaths" = 'yes' ]; then
;;
esac
fi
-fi
-
-mkdir "$buildresult"
-sudo mkdir "$basepath" "$aptcache"
+ mkdir -p "$buildresult"
+ sudo mkdir -p "$basepath" "$aptcache"
+i
sudo cowbuilder --create \
--buildresult "$buildresult" \