You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
distros-overlay/profiles/templates/6_ac_update_sync/revision/2023/20230214.1-ccm-container-ov...

26 lines
670 B

# Calculate exec=/bin/bash ini(overlay-distros.revision)<#-cut(0)-#
#-ini(overlay-distros.revision,#-cut(0)-#)-#
if grep -q '\[container\]' /etc/portage/repos.conf/zz-calculate.conf && \
[[ ! -e /etc/portage/repos.conf/cl-lxc.conf ]]
then
while IFS= read -r line; do
if [[ $line == '[container]' ]]; then
new=1
elif [[ ${line::1} == '[' ]]; then
new=
fi
if [[ $new == 1 ]]; then
echo $line >> /etc/portage/repos.conf/cl-lxc.conf
else
echo $line >> /etc/portage/repos.conf/zz-calculate-new.conf
fi
mv /etc/portage/repos.conf/{zz-calculate-new.conf,zz-calculate.conf}
done <<< $(cat /etc/portage/repos.conf/zz-calculate.conf)
fi
exit 0