I am working on a toolkit for the company i work for, the problem is, one of the tools in this 'kit' needs to have the ability to recognize architectures, i already got 32 and 64 bits working but i cant get arm to work, can anyone help? this is what i got and need..
if [ "$arch" == 'armv' ];
then
echo "ARM Architecture
What i want it to do is that when a arm architecture (6 or 7 i dont really care about that point) is detected, that it just says arm architecture, but i already tried editing
if [ "$arch" == 'armv' ];
to
if [ "$arch" == 'armv*' ];
If someone knows a solution any help would be welcome.
Oh and i use shell/bash because they dont want any additional programs on the machines, so i use bash and shell scripting so they have their own programs :)
------------------ EDIT ------------------
Here is the code fully so you guys can have a idea of what im trying
arch=$(uname -i)
if [ "$arch" == 'x86_64' ];
then
echo "X64 Architecture"
fi
if [ "$arch" == 'x86_32' ];
then
echo "X32 Architecture"
fi
if [ "$arch" == 'armv*' ];
then
echo "Arm architecture"
fi
arch=$(uname -i) if [ "$arch" == 'x86_64' ]; then echo "X64 Architecture" fi
for example, it works with both 32 and 64 bits but i cant get it to work with arm, i want/need to make it so that if the arch fromuname -i
= armv** that it automaticly see's it as a arm cpu