diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-06-17 19:24:48 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-06-17 19:24:48 -0400 |
commit | 827e305df0f565d7da844684290323a75bf081a6 (patch) | |
tree | 9753469d58a11b434d8da109c00a23c0e721a52d /create-repo | |
parent | d42f5c6ab02a861ef548ae12fe403f61e2b02e4f (diff) | |
parent | 1d5db10302f0a0517c022fae4b6a66862eb7e2cf (diff) |
Merge branch 'lukeshu/archlinux+xbs+merge-parabola' into lukeshu/archlinux+xbs+db-import
Diffstat (limited to 'create-repo')
-rwxr-xr-x | create-repo | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/create-repo b/create-repo new file mode 100755 index 0000000..1ec9798 --- /dev/null +++ b/create-repo @@ -0,0 +1,24 @@ +#!/bin/bash +# Creates repository structure + +. "$(dirname "$(readlink -e "$0")")/config" +. "$(dirname "$(readlink -e "$0")")/db-functions" + +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 %s/config" "$(dirname "$(readlink -e "$0")")" |