Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cdist/conf/type/__apt_update_index/gencode-remote
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@

# run 'apt-get update' if anything in /etc/apt is newer then /var/lib/apt/lists
cat << DONE
if find /etc/apt -mindepth 1 -cnewer /var/lib/apt/lists | grep . > /dev/null; then
newer_sources=\$(find /etc/apt -mindepth 1 -cnewer /var/lib/apt/lists)
if [ ! -d /var/lib/apt/lists ] || [ -n "${newer_sources}" ]; then
apt-get update || apt-get update
fi
DONE