Commit 200df9d1 authored by Vitaly Lipatov's avatar Vitaly Lipatov

distr_info: add --debian-arch

parent d0986ccb
...@@ -403,20 +403,28 @@ esac ...@@ -403,20 +403,28 @@ esac
echo "$DIST_ARCH" echo "$DIST_ARCH"
} }
get_distro_arch() get_debian_arch()
{ {
local arch="$(get_arch)" local arch="$(get_arch)"
case "$(pkgtype)" in
rpm)
:
;;
deb)
case $arch in case $arch in
'i586') 'i586')
arch='i386' ;; arch='i386' ;;
'x86_64') 'x86_64')
arch='amd64' ;; arch='amd64' ;;
esac esac
echo "$arch"
}
get_distro_arch()
{
local arch="$(get_arch)"
case "$(pkgtype)" in
rpm)
:
;;
deb)
get_debian_arch
return
;; ;;
esac esac
echo "$arch" echo "$arch"
...@@ -614,6 +622,12 @@ case $1 in ...@@ -614,6 +622,12 @@ case $1 in
get_distro_arch get_distro_arch
exit 0 exit 0
;; ;;
--debian-arch)
# override DISTRIB_ID
test -n "$2" && DISTRIB_ID="$2"
get_debian_arch
exit 0
;;
-d) -d)
echo $DISTRIB_ID echo $DISTRIB_ID
;; ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment