summaryrefslogtreecommitdiff
path: root/extra/legacy/create-repo
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2015-08-26 03:40:56 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2015-08-26 03:40:56 -0300
commit50d2db5c271537d78ea0037fe285d081df38fa02 (patch)
treebcb8911f516a5561b3ec37cb0a010e603a494586 /extra/legacy/create-repo
parent8eafe04ec5eaf917d9e2d58993604c454f1a26d1 (diff)
add copy from the master repo
Diffstat (limited to 'extra/legacy/create-repo')
-rwxr-xr-xextra/legacy/create-repo21
1 files changed, 21 insertions, 0 deletions
diff --git a/extra/legacy/create-repo b/extra/legacy/create-repo
new file mode 100755
index 0000000..3feb098
--- /dev/null
+++ b/extra/legacy/create-repo
@@ -0,0 +1,21 @@
+#!/bin/bash
+# Creates repository structure
+
+. "$(dirname "$(readlink -e "$0")")/config"
+. "$(dirname "$(readlink -e "$0")")/db-functions"
+
+if [ $# -eq 0 ]; then
+ msg "Usage: %s repo1 [repo2 ... repoX]" "${0##*/}"
+ exit 1
+fi
+
+msg "Creating repos..."
+for _repo in "$@"; do
+ msg2 "Creating [%s]" "${_repo}"
+ for _arch in "${ARCHES[@]}"; do
+ mkdir -p "${FTP_BASE}/${_repo}/os/${_arch}" || \
+ error "Failed creating %s dir" "${_arch}"
+ done
+done
+
+msg "Don't forget to add them to the PKGREPOS array on %s" "$(dirname "$(readlink -e "$0")")/config"