summaryrefslogtreecommitdiff
path: root/create-repo
blob: 89233c7627dd89aef6cbbadfbbef591df15315bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
# Creates repository structure

source "$(dirname "$(readlink -e "$0")")/etc/dbscripts.cfg"
source "$(dirname "$(readlink -e "$0")")/share/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 "${native_architectures[@]}"; do
		mkdir -p "${root_dir}/${_repo}/os/${_arch}" || \
			error "Failed creating %s dir" "${_arch}"
	done
done

msg "Don't forget to add them to the repositories array on %s" "$(dirname "$(readlink -e "$0")")/etc/dbscripts.cfg"