summaryrefslogtreecommitdiff
path: root/create-repo
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-10-28 12:17:38 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-10-28 12:17:38 -0300
commit560d8b718c59acf36fb76b9766add53434c98b1d (patch)
tree21199c8102f85f5c1921653d16978b8c8e1591df /create-repo
parent9612e5d915faf63ea6d5a5ca5c3ff74cca8eb923 (diff)
parente9d0581b173853e647b36caa170b7c4bbee43643 (diff)
Merge branch 'master' of https://projects.parabolagnulinux.org/dbscripts
Conflicts: config
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"