#!/bin/bash # Deploys mock config files to a user's config directory # Latest Versions GREEN_OBSIDIAN=9 BLUE_ONYX=3 #RED_QUARTZ=0 GREEN_OBSIDIAN_ARCH=(x86_64 aarch64 i686) BLUE_ONYX_ARCH=(x86_64 aarch64 i686 ppc64le s390x) RED_QUARTZ_ARCH=(x86_64 aarch64 ppc64le s390x) # vars MOCK_DIR="${HOME}/.config/mock" mkdir -p "${MOCK_DIR}/templates" cp etc/mock/templates/*.tpl "${MOCK_DIR}/templates" # green obsidian number=4 while [[ $number -le $(( GREEN_OBSIDIAN - 1 )) ]]; do for arch in "${GREEN_OBSIDIAN_ARCH[@]}"; do sed "s|8\.X|8.$number|g" etc/mock/rl-8.X-$arch.cfg > ${MOCK_DIR}/rl-8.$number-$arch.cfg done (( number = number + 1 )) done for arch in "${GREEN_OBSIDIAN_ARCH[@]}"; do cp etc/mock/rl-8-$arch.cfg ${MOCK_DIR} done # blue onyx number=0 while [[ $number -le $(( BLUE_ONYX - 1 )) ]]; do for arch in "${BLUE_ONYX_ARCH[@]}"; do sed "s|9\.X|9.$number|g" etc/mock/rl-9.X-$arch.cfg > ${MOCK_DIR}/rl-9.$number-$arch.cfg done (( number = number + 1 )) done for arch in "${BLUE_ONYX_ARCH[@]}"; do cp etc/mock/rl-9-$arch.cfg ${MOCK_DIR} done # red quartz for arch in "${RED_QUARTZ_ARCH[@]}"; do cp etc/mock/rl-10-lookahead-$arch.cfg ${MOCK_DIR} done