diff --git a/scripts/get-os.sh b/scripts/get-os.sh index 721e639b..b3adf65c 100755 --- a/scripts/get-os.sh +++ b/scripts/get-os.sh @@ -49,6 +49,30 @@ cmd_name_version() echo suse-tumbleweed else [ "$ID_LIKE" ] && ID=$ID_LIKE + case "$ID" in + debian) + VERSION_NAME=`echo $PRETTY_NAME | awk 'NF>1{print $NF}' | sed 's%/.*%%' | tr '[A-Z]' '[a-z]'` + case $VERSION_NAME in + buster) VERSION_ID=10;; + stretch) VERSION_ID=9;; + jessie) VERSION_ID=8;; + wheezy) VERSION_ID=7;; + squeeze) VERSION_ID=6.0;; + lenny) VERSION_ID=5.0;; + etch) VERSION_ID=4.0;; + sarge) VERSION_ID=3.1;; + woody) VERSION_ID=3.0;; + potato) VERSION_ID=2.2;; + slink) VERSION_ID=2.1;; + hamm) VERSION_ID=2.0;; + *) + ;; + esac + ;; + *) + VERSION_ID=42 + ;; + esac echo $ID-$VERSION_ID | sed 's/opensuse/suse/g' fi fi