2014-09-12 00:59:50 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2014-09-04 04:56:29 +00:00
|
|
|
if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
|
|
|
set -eu
|
2014-09-12 00:59:50 +00:00
|
|
|
set -o pipefail
|
|
|
|
|
2015-07-23 19:26:53 +00:00
|
|
|
if [[ $DISTRO_NAME == "fedora" && $DIB_RELEASE -ge 22 ]]; then
|
2015-05-27 04:53:04 +00:00
|
|
|
cfg=/etc/dnf/dnf.conf
|
2015-10-09 04:43:19 +00:00
|
|
|
cachedir=/var/cache/dnf
|
2015-05-27 04:53:04 +00:00
|
|
|
else
|
|
|
|
cfg=/etc/yum.conf
|
2015-10-09 04:43:19 +00:00
|
|
|
cachedir=/var/cache/yum
|
2015-05-27 04:53:04 +00:00
|
|
|
fi
|
|
|
|
|
2015-10-09 04:43:19 +00:00
|
|
|
sed -i "/^keepcache/c\keepcache=0" $cfg
|
|
|
|
sed -i "/^cachedir/c\cachedir=${cachedir}" $cfg
|