summaryrefslogtreecommitdiff
path: root/create-repo
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2011-08-05 19:41:12 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2011-08-05 19:41:12 -0300
commit0e4184bc0c06eccd4484c9028c0369554d482aa1 (patch)
treefa4143074942d3e2ff417a4acedb985b7db07ee6 /create-repo
parentd438ff5d25372ba32e42f89c808f5b33a25042f3 (diff)
Added script for creating repos
Diffstat (limited to 'create-repo')
-rwxr-xr-xcreate-repo24
1 files changed, 24 insertions, 0 deletions
diff --git a/create-repo b/create-repo
new file mode 100755
index 0000000..58842c3
--- /dev/null
+++ b/create-repo
@@ -0,0 +1,24 @@
+#!/bin/bash
+# Creates repository structure
+
+. "$(dirname $0)/db-functions"
+. "$(dirname $0)/config"
+
+if [ $# -eq 0 ]; then
+ msg "Usage: $0 repo1 [repo2 ... repoX]"
+ exit 1
+fi
+
+msg "Creating repos..."
+for _repo in $@; do
+ msg2 "Creating [${_repo}]"
+ mkdir -p "${FTP_BASE}/staging/${_repo}" || \
+ error "Failed creating staging dir"
+
+ for _arch in ${ARCHES[@]}; do
+ mkdir -p "${FTP_BASE}/${_repo}/os/${_arch}" || \
+ error "Failed creating ${_arch} dir"
+ done
+done
+
+msg "Don't forget to add them to the PKGREPOS array on $(dirname $0)/config"