#!/bin/bash if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then set -x fi set -eu set -o pipefail if [ $DIB_RELEASE -ge 22 ]; then # dnf is slightly different; doesn't have these by default cfg=/etc/dnf/dnf.conf echo "keepcache=1" >> $cfg echo "cachedir=/tmp/yum" >> $cfg else cfg=/etc/yum.conf sed -i 's/keepcache=0/keepcache=1/' $cfg sed -i 's/cachedir=\/var\/cache\/yum/cachedir=\/tmp\/yum/' $cfg fi