Skip to content

Instantly share code, notes, and snippets.

@MosesMendoza
Created October 30, 2013 21:39
Show Gist options
  • Save MosesMendoza/7240812 to your computer and use it in GitHub Desktop.
Save MosesMendoza/7240812 to your computer and use it in GitHub Desktop.
# assume squeeze as default if no others
dist="squeeze"
if [ -f "/etc/lsb-release" ]
then
dist=`cat /etc/lsb-release 2>/dev/null | egrep CODENAME | cut -d = -f 2 | tr '[[:upper:]]' '[[:lower:]]'`
elif [ -f "/etc/debian_version" ]
then
vers=`cat /etc/debian_version 2>/dev/null | cut -d . -f 1`
if [ "$vers" -eq 5 ]
then
dist="lenny"
fi
fi
sed -i "s/dist/$dist/g" /etc/apt/sources.list.d/puppetlabs.list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment