summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2015-08-25 22:26:09 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2015-08-25 22:26:09 -0300
commitddf3094cc0d609901bc84a8b77885723dec707cb (patch)
tree65ce84d86b9bdb0e8417da9713f632ed941b4afd
parentd553eeaa268c4e26422a6b82b677c2ef4f42a597 (diff)
fix create-repo variables
-rwxr-xr-xcreate-repo13
1 files changed, 9 insertions, 4 deletions
diff --git a/create-repo b/create-repo
index 7905a0a..0c0f2f9 100755
--- a/create-repo
+++ b/create-repo
@@ -14,19 +14,24 @@ if [ "$#" -eq '0' ]; then
fi
for 'platform' in "${PLATFORMS[@]}"; do
- case $1 in
+ case "$1" in
--platform|-platform|-p)
+
+ # Don't create [--platform], [-platform] or [-p] and [<platforms>] repos
_repos=($@) && unset _repos[0] _repos[1]
- if [ "$2" == "${platform}" ]; then
+ # Rename plataform name ($2) to easily script usage
+ _platform="${2/\//+}" _platform="${_platform,,}"
+
+ if [ "${_platform}" == "${platform}" ]; then
source "$(dirname "$(readlink -e "$0")")/config_${2}"
- msg "Creating repos... from $2 platform"
+ msg "Creating repos... from ${PLATFORM_NAME} platform"
for '_repo' in "${_repos[@]}"; do
msg2 "Creating [%s]" "${_repo_all}"
for '_arch' in "${ARCHES[@]}"; do
mkdir -p "${REPO_DIR}/${_repo}/os/${_arch}" || \
- error "Failed creating %s dir" "${_arch}" "from $2 platform"
+ error "Failed creating %s dir" "${_arch}" "from ${PLATFORM_NAME} platform"
done
done