summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-08-05 15:42:20 -0700
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-08-05 15:42:20 -0700
commit747c58ab578a3f808c4e38bd70b46cfd47ece5ca (patch)
treed3f8c9a07ff37e28fd2330c4136286255d085b53
parent82d742b818f730a0bac008075f1b6fad2758747f (diff)
parent0e4184bc0c06eccd4484c9028c0369554d482aa1 (diff)
Merge branch 'master' of http://projects.parabolagnulinux.org/dbscripts into stable
-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"