etc-update: combined use of /etc/os-release ID and ID_LIKE

Closes: https://github.com/gentoo/portage/pull/372
Signed-off-by: Kewl Fft xrjy@nygb.rh.bet (rot13)
Signed-off-by: Zac Medico <zmedico@gentoo.org>
diff --git a/bin/etc-update b/bin/etc-update
index f0aaca1..3951ec6 100755
--- a/bin/etc-update
+++ b/bin/etc-update
@@ -32,13 +32,13 @@
 		"${PORTAGE_CONFIGROOT}"etc/etc-update.conf)
 }
 
-OS_RELEASE_ID=$(cat /etc/os-release 2>/dev/null | grep '^ID=' | cut -d'=' -f2 | sed -e 's/"//g')
+OS_RELEASE_POSSIBLE_IDS=$(source /etc/os-release >/dev/null 2>&1; echo ":${ID}:${ID_LIKE}:")
 
-case $OS_RELEASE_ID in
-	suse|opensuse|opensuse-leap|opensuse-tumbleweed) OS_FAMILY='rpm' ;;
-	fedora|rhel) OS_FAMILY='rpm' ;;
-	arch|archarm|arch32|manjaro|antergos) OS_FAMILY='arch' NEW_EXT='pacnew';;
-	*) OS_FAMILY='gentoo' ;;
+case ${OS_RELEASE_POSSIBLE_IDS} in
+	*:suse:*|*:opensuse:*|*:opensuse-tumbleweed:*) OS_FAMILY='rpm';;
+	*:fedora:*|*:rhel:*) OS_FAMILY='rpm';;
+	*:arch:*|*:manjaro:*|*:antergos:*) OS_FAMILY='arch' NEW_EXT='pacnew';;
+	*) OS_FAMILY='gentoo';;
 esac
 
 if [[ $OS_FAMILY == 'gentoo' ]]; then