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

distr_info: add --debian-arch

parent d0986ccb
...@@ -403,6 +403,18 @@ esac ...@@ -403,6 +403,18 @@ esac
echo "$DIST_ARCH" echo "$DIST_ARCH"
} }
get_debian_arch()
{
local arch="$(get_arch)"
case $arch in
'i586')
arch='i386' ;;
'x86_64')
arch='amd64' ;;
esac
echo "$arch"
}
get_distro_arch() get_distro_arch()
{ {
local arch="$(get_arch)" local arch="$(get_arch)"
...@@ -411,12 +423,8 @@ get_distro_arch() ...@@ -411,12 +423,8 @@ get_distro_arch()
: :
;; ;;
deb) deb)
case $arch in get_debian_arch
'i586') return
arch='i386' ;;
'x86_64')
arch='amd64' ;;
esac
;; ;;
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